Back to Community

Troubleshooting the 'rewrites_not_executed' and 'rewrites_not_working' Errors in Converter for Media

Content

If you're using the Converter for Media – Optimize images | Convert WebP & AVIF plugin, you might have encountered one of two frustrating error messages: rewrites_not_executed or rewrites_not_working. These errors prevent the plugin from serving optimized images, which can impact your site's performance.

Based on community reports and troubleshooting threads, this guide will explain what these errors mean, their common causes, and the steps you can take to resolve them.

What Do These Errors Mean?

These errors indicate that your server is not correctly processing the rewrite rules the plugin writes to .htaccess files. These rules are essential for the plugin to dynamically serve WebP or AVIF images to supported browsers while falling back to original images for others.

  • rewrites_not_executed: This error typically points to a server-level configuration issue where the Apache server is not allowed to read .htaccess files from directories like /wp-content/ or /wp-content/uploads/.
  • rewrites_not_working: This is a broader error that can occur even if the server is configured to read .htaccess files. It often means the server is not executing the specific redirect rules contained within them.

Common Causes and Solutions

1. Apache Server Configuration (AllowOverride)

The most common cause for the rewrites_not_executed error is an Apache setting. For .htaccess rules to work, the Apache VirtualHost configuration must have AllowOverride All set for your site's directory, not AllowOverride None.

How to fix it:

  • You or your server administrator need to locate your Apache configuration file (often found in /etc/apache2/sites-enabled/ or similar).
  • Find the <Directory> section corresponding to your WordPress installation's directory.
  • Change the line AllowOverride None to AllowOverride All.
  • Save the file and restart Apache for the changes to take effect (e.g., sudo systemctl restart apache2).

2. Specific Hosting Environments (Bitnami, NGINX, LiteSpeed)

Some hosting stacks, like Bitnami, or servers using NGINX or LiteSpeed, require special configuration.

Bitnami: The standard Apache configuration may need adjustment. The 'Converter for Media' team provides a specific guide for Bitnami configuration.

NGINX: Since NGINX does not use .htaccess files, the rewrite rules must be manually added to the server's NGINX configuration file. You will need to contact your server administrator or hosting provider to add the rules found in the plugin's FAQ.

LiteSpeed: Similar to Apache, ensure that the server is configured to allow .htaccess overrides.

3. File and Folder Permissions

The plugin needs permission to create and write to .htaccess files in specific directories (/wp-content/, /wp-content/uploads/, and /wp-content/uploads-webpc/). If it cannot, the rules will not be written.

How to fix it:

  • Check that the /wp-content/uploads-webpc/ directory exists. If it doesn't, create it manually.
  • Ensure all three directories have the correct write permissions (often 755 for directories and 644 for files). You may need to use an FTP client or your hosting control panel's file manager to adjust these.

4. Plugin Conflicts or Bugs

In some cases, an update to the plugin or a conflict with another plugin can cause these errors to appear.

How to fix it:

  • Clear your browser cookies and cache: One user reported that simply clearing their site cookies resolved the issue after a reinstall.
  • Check for a beta version: The plugin's developer has occasionally released beta versions to address specific rewrite issues. You may find a discussion thread where a user is asked to test a beta fix.
  • Temporarily disable other plugins: A conflict with another plugin, especially caching plugins, can interfere with rewrite rules. Try disabling other plugins to see if the error resolves.

5. Using "Pass Thru" Mode as a Temporary Workaround

If you cannot immediately resolve the server configuration, you can enable "Pass Thru" mode in the plugin's settings. This mode uses a PHP-based method to serve images instead of relying on server rewrites. Be aware that this method can be less efficient and may have compatibility issues with some themes or plugins.

What to Do If You're Still Stuck

If you have tried these steps and the error persists, the problem is likely a complex server-specific configuration. Your best course of action is to:

  1. Go to the Help Center tab in the plugin's settings page.
  2. Take a full-page screenshot of all the information displayed there.
  3. Provide this screenshot and a detailed description of the steps you've already taken to your server administrator or hosting support team. The error is almost always related to server settings, and they are in the best position to diagnose and fix it.

Remember, the plugin is diagnosing a server environment issue; it is not causing the issue itself. Patience and clear communication with your hosting provider are key to resolving these errors.

Related Support Threads Support