Troubleshooting Common Server Configuration Errors with Converter for Media
Content
Many users of the 'Converter for Media – Optimize images | Convert WebP & AVIF' plugin encounter server configuration errors that prevent the plugin from functioning correctly. These issues are often related to specific server setups, caching layers, or hosting provider restrictions. This guide outlines the most common errors and provides steps to resolve them.
Common Error: Server Configuration Error / rewrites_cached
This error frequently appears when a server-level caching mechanism or a proxy service (like Cloudflare) is intercepting requests for images before they reach the plugin's rewrite rules. The server logs might show messages like "Invalid rewrite directive" or "bypassed."
Why It Happens:
- Hosting-Specific Caching: Many managed hosts (e.g., SiteGround, Cloudways) use Nginx Direct Delivery or similar technologies to serve static files directly, bypassing Apache and its .htaccess rules.
- Reverse Proxies & CDNs: Services like Cloudflare can cache or alter request headers, which interferes with the plugin's ability to detect browser support for WebP/AVIF and serve the correct image.
- Nginx Configuration: On Nginx servers, the required rewrite rules must be manually added to the server configuration file. If they are added incorrectly, or in the wrong location within the file, they will not work.
How to Troubleshoot and Resolve:
1. For Apache Servers with Nginx Caching (e.g., SiteGround, Cloudways)
The error often indicates that a feature like "Nginx Direct Delivery" or "Smart static files processing" is active. You must disable this feature for image files.
- SiteGround: In Site Tools, go to Speed > Caching and find the "Nginx Direct Delivery" section to disable it.
- Cloudways: The "Enable WebP" setting in the Cloudways platform can conflict with the plugin. Try disabling it and relying solely on the plugin's conversion and delivery.
- General Advice: Contact your hosting support and request that they "disable Nginx caching for static image files (.jpg, .jpeg, .png, .gif, .webp). These files should be handled by the Apache server to allow .htaccess rules to execute."
2. For Nginx Servers
If you manage your own server or have a VPS, you need to add the configuration rules manually.
- Locate your server's Nginx configuration file (often in
/etc/nginx/sites-available/your-siteor/etc/nginx/conf.d/). - Insert the code block provided in the plugin's FAQ inside the
server {}block, ensuring it is placed before any other location rules that might match image requests. - After adding the code, test the configuration with
sudo nginx -tand reload Nginx withsudo systemctl reload nginx. - Common Pitfall: A frequent mistake is adding the rules to an Nginx config file that is not active for the website in question. Double-check that you are editing the correct virtual host file.
3. For Websites Using Cloudflare
Cloudflare's caching and features like Universal SSL can cause a rewrites_cached error.
- Page Rule: Create a Page Rule for your website URL to cache everything. This can sometimes resolve the conflict, though it is not a guaranteed solution on all plans.
- Be cautious: As noted in one thread, disabling Universal SSL to fix the error will break your site's HTTPS functionality, so this is not a recommended solution.
- The 'Converter for Media' team suggests that full compatibility with Cloudflare can be difficult to achieve due to how it proxies traffic.
4. Check File Permissions (Forbidden Errors)
Some users report "403 Forbidden" errors when trying to access images. This can happen if the WebP images generated by the plugin are created with incorrect file permissions that the web server user cannot read. Ensure the wp-content/uploads-webpc/ directory and its contents have the correct read/execute permissions for the web server user (e.g., 755 for directories and 644 for files).
What to Do If You're Stuck
If these steps do not resolve the issue, gather the following information to help troubleshoot further:
- Your hosting provider and server type (e.g., Apache, Nginx).
- A screenshot of the "Help Center" tab in the plugin's settings.
- Any relevant error logs from your server.
Armed with this information, you can seek further assistance in community support forums. Remember, for specific hosting environments like WordPress.com or Pantheon, direct server configuration changes are often not possible, and you may need to explore alternative plugins.
Related Support Threads Support
-
Make Converter for Media work on Cyber Panel VPShttps://wordpress.org/support/topic/make-converter-for-media-work-on-cyber-panel-vps/
-
i have error when i use the pluginhttps://wordpress.org/support/topic/i-have-error-when-i-use-the-plugin/
-
Problem with nginx webp conversiónhttps://wordpress.org/support/topic/problem-with-nginx-webp-conversion/
-
Subject: Issue with plugin installationhttps://wordpress.org/support/topic/subject-issue-with-plugin-installation/
-
Server configuration errorhttps://wordpress.org/support/topic/server-configuration-error-42/
-
siteground hosting issuehttps://wordpress.org/support/topic/siteground-hosting-issue/
-
Коды ошибок: bypassing_apachehttps://wordpress.org/support/topic/%d0%ba%d0%be%d0%b4%d1%8b-%d0%be%d1%88%d0%b8%d0%b1%d0%be%d0%ba-bypassing_apache/
-
Error codes: bypassing_apachehttps://wordpress.org/support/topic/error-codes-bypassing_apache/
-
Plesk + Converter doesn’t workhttps://wordpress.org/support/topic/plesk-converter-doesnt-work/
-
Trying to configure CfMhttps://wordpress.org/support/topic/trying-to-configure-cfm/
-
Server Configuration Error Cloudflare to WebP converter for Mediahttps://wordpress.org/support/topic/server-configuration-error-cloudflare-to-webp-converter-for-media/
-
Nginx errorhttps://wordpress.org/support/topic/nginx-error/
-
Changed the config but still doesn’t work [Converter for Mediahttps://wordpress.org/support/topic/changed-the-config-but-still-doesnt-work-converter-for-media/
-
Error codes: rewrites_cachedhttps://wordpress.org/support/topic/error-codes-rewrites_cached-3/
-
Cannot convert to webp format on Docker and Nginxhttps://wordpress.org/support/topic/cannot-convert-to-webp-format-on-docker-and-nginx/
-
for video ?https://wordpress.org/support/topic/for-video/
-
Possible Bughttps://wordpress.org/support/topic/possible-bug-34/
-
SERVER CONFIGURATION ERROR/ WebP Converter for Mediahttps://wordpress.org/support/topic/server-configuration-error-webp-converter-for-media/
-
Server Errorhttps://wordpress.org/support/topic/server-error-103/
-
config Nginxhttps://wordpress.org/support/topic/config-nginx/
-
Apache 2.4.54 (Debian) Server at Port 80https://wordpress.org/support/topic/apache-2-4-54-debian-server-at-port-80/