As an advocate for optimizing website performance, I’ve always recommended the use of caching plugins on all WordPress sites. Caching plugins significantly reduce server load and enhance site speed, making them invaluable tools for website management. However, when integrating the WP Super Cache plugin into a site already utilizing WPtouch, I encountered an unexpected snag. Hence, this article on fixing WP Super Cache and WPtouch integration. An error showed up on the dashboard, signaling a configuration problem between WP Super Cache and WPtouch. This issue could result in serving cached desktop pages to mobile devices and vice versa.
This is what showed on my dashboard:
<div class="error"><p><strong style="color: darkred">WPtouch: WP Super Cache needs to be configured to work correctly with WPtouch.</strong></p><p>Fixing this issue prevents cached desktop pages being served to mobile devices and vice-versa.</p><p>Once fixed, this message will be dismissed automatically. Until fixed, <em><strong>WPtouch will not be shown</strong></em> to mobile visitors, and cannot be previewed.</p><p>To fix the issue, follow our <a href="https://support.wptouch.com/support/solutions/articles/5000537668-configuring-cache-plugins-for-wptouch?utm_campaign=cache_smash&utm_medium=web&utm_source=wptouch-free" target="_blank">step-by-step setup guide</a> on support.wptouch.com</p></div>
I don’t know exactly why it was showing with HTML tags at the top of my dashboard. What it was most likely supposed to look like, according to the HTML code was this:
WPtouch: WP Super Cache needs to be configured to work correctly with WPtouch.
Fixing this issue prevents cached desktop pages being served to mobile devices and vice-versa.
Once fixed, this message will be dismissed automatically. Until fixed, WPtouch will not be shown to mobile visitors, and cannot be previewed.
To fix the issue, follow our step-by-step setup guide on support.wptouch.com.
To add insult to injury, the link it sent one to resulted in a page not found (404) error! Regardless, this error underlines the importance of properly configuring both plugins to work in harmony. Luckily, I was able to piece together some help from the WPtouch support site that works based on posts there.
Fixing WP Super Cache and WPtouch Integrations
In this guide, I will walk you through the necessary steps to address and resolve this compatibility issue, ensuring that your website delivers the correct content to each visitor, regardless of their device.
Step 1: Activating Mobile Device Support
Begin by navigating to the Advanced settings tab within WP Super Cache. Here, you’ll find an option for “Mobile Device Support.” It’s crucial to enable this feature to differentiate between mobile and desktop requests effectively. Simply check this option and hit “Update Status” to activate.
Step 2: Adjusting Rejected User Agents
Next, specify which user agents (browsers) to exclude from caching. This prevents caching mobile pages as desktop pages and vice versa. Still in the Advanced tab, locate the “Rejected User Agents” section. Paste the comprehensive list of mobile user agents provided by WPtouch into this box. This list includes common mobile browsers and devices, ensuring that visitors on these platforms receive the appropriate version of your site. After pasting, remember to click “Save UA Strings” to apply your changes.
List of Mobile User Agents (copy right from here):
iPhone iPod Android BB10 BlackBerry webOS IEMobile/7.0 IEMobile/9.0 IEMobile/10.0 MSIE 10.0 iPad PlayBook Xoom P160U SCH-I800 Nexus 7 Touch
Step 3: Incorporating Additional User Agents
If you’ve customized WPtouch Pro with support for additional mobile devices via its Settings > Devices > Additional User Agents feature, you must also include these custom user agents in the “Rejected User Agents” list of WP Super Cache. This ensures that your site’s caching logic comprehensively accounts for all mobile visitors.
Step 4: Purging Old Cache
With new settings in place, it’s vital to clear out any previously cached content that might conflict with your updated configuration. Navigate to the “Contents” tab within WP Super Cache and click both “Delete Expired” and “Delete Cached.” This action guarantees that all visitors receive fresh content that follows the new caching rules.
Step 5: Confirming Plugin Compatibility
If you’re a WPtouch Pro user, make sure the WP Super Cache shows up as compatible in the WPtouch Pro admin panel, under Settings > Site Compatibility > Active Plugins. The free version of WPtouch automatically configures this step, but it’s crucial for Pro users to avoid conflicts with the Pro version.
Step 6: Disabling Conflicting Features
Lastly, for WPtouch Pro installations, it’s important to disable the native WPtouch support within WP Super Cache found under the “Plugins” tab. This prevents any overlap or conflict between the free version’s support and the Pro version’s advanced features.
By following these steps, you can rectify the integration issue between WP Super Cache and WPtouch, ensuring your WordPress site remains fast, accessible, and responsive across all devices. This guide not only resolves the immediate error message but also secures your site’s performance for the future, leveraging the full potential of both plugins.
More info on the two plugins mentioned here:
WP Super Cache by Automattic:
https://wordpress.org/plugins/wp-super-cache/
WPtouch by WPtouch:
https://wordpress.org/plugins/wptouch/