Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically disable Endurance caches when another caching plugin is installed? #27

Open
mimicplay opened this issue Aug 22, 2017 · 9 comments

Comments

@mimicplay
Copy link

I just installed WP Rocket, a premium caching plugin, on a website yesterday (ils-automation.com). While troubleshooting after the install, I discovered these Endurance page & browser cache plugins. I didn't even know these had been installed by BlueHost onto my WordPress site until I realized caching wasn't working as it is supposed to with WP Rocket.

Anyhow, I see Endurance has added some code to my htaccess file, and it appears to be "overpowering" the htaccess code that WP Rocket adds. I have some questions about how to handle this:

  1. The WP Rocket support rep, Lucy, told me that she's spoken with you before about Endurance, and that Endurance is supposed to automatically disable its caches when it detects another caching plugin. This doesn't seem to have occurred. Endurance Page Cache is "disabled" in WP plugins admin (I have the option to Enable it), but Endurance Browser Cache is "enabled" and there's no disable option. If these plugins are supposed to auto-disable themselves, they did not successfully remove Endurance's htaccess code, which is causing some issues. Are both Endurance caches "auto-disabling when another caching plugin is activated" working as intended, or is this a bug? Or was this auto-disable feature removed? How can I disable Endurance Browser Cache to make sure it's not conflicting with WP Rocket?

Note that I don't think something is completely disabled since in my WP Admin top bar, I see a Caching drop-down menu with options to "Purge All" and "Cache Settings." Cache Settings takes me to my General Settings page, on which there are no cache setting options at all.

  1. Since I would prefer to use WP Rocket instead of Endurance, how can I safely disable and remove Endurance Cache plugin stuff? Would it be best to submit a support ticket with BlueHost and have their team handle it? Can I just remove Endurance's code from my htaccess file and re-save (if so, what code should be removed to make sure I delete everything)? Do I need to delete the "mu-plugins" folder, or just the files inside of it (endurance-page-cache.php and endurance-browser-cache.php)?

If you need to see my htaccess file, please let me know and I can email it to you.

@MikeHansenMe
Copy link
Member

Hey @mimicplay it sounds like you have an older version of the plugins. I will jump into the account, take a look at the versions to see if there is a bug here that needs to be addressed and get them fully disabled for you. Thanks!

@mimicplay
Copy link
Author

@MikeHansenMe Wow thank you for the insanely fast response! Endurance Browser Cache is listed as 0.4. Endurance Page Cache is listed as 0.9 (info through my WP Admin Plugins screen).

@MikeHansenMe
Copy link
Member

Current version is 1.1. I removed the browser cache plugin as it was merged into the page cache plugin. There is indeed a bug with the nav item showing when the plugin is disabled. I will get that into the next release, thanks for letting me know.

Everything should be good to go now. Let me know if you have any additional questions. I am happy to help.

@mimicplay
Copy link
Author

mimicplay commented Aug 22, 2017

Thanks! I just have the remaining question about the htaccess file. The conflicting code that I think was inserted by Endurance is as follows The Expires stuff especially needs to go away as WP Rocket is setting those values in its own plugin (so I've now got duplicate Expires values in htaccess). Can all the code below be safely deleted by me?

<IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access plus 6 hours" ExpiresByType image/jpeg "access plus 6 hours" ExpiresByType image/gif "access plus 6 hours" ExpiresByType image/png "access plus 6 hours" ExpiresByType text/css "access plus 6 hours" ExpiresByType application/pdf "access plus 1 week" ExpiresByType text/javascript "access plus 6 hours" ExpiresByType text/html "access plus 10 minutes" ExpiresByType image/x-icon "access plus 1 year" ExpiresDefault "access plus 3 hours" </IfModule> Options -Indexes Header set X-Endurance-Cache-Level "2" <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^/wp-content/endurance-page-cache/ - [L] RewriteCond %{REQUEST_METHOD} !POST RewriteCond %{QUERY_STRING} !.*=.* RewriteCond %{HTTP_COOKIE} !(wordpress_test_cookie|comment_author|wp\-postpass|wordpress_logged_in|wptouch_switch_toggle|wp_woocommerce_session_) [NC] RewriteCond %{DOCUMENT_ROOT}/wp-content/endurance-page-cache/$1/_index.html -f RewriteRule ^(.*)$ /wp-content/endurance-page-cache/$1/_index.html [L] </IfModule>

Sorry that I'm not 100% sure how to get line breaks to happen in this Github comment section!!
Here's a screenshot that's a little cleaner to read:
image

@MikeHansenMe
Copy link
Member

That was from the plugin when it was active. I just resaved your permalinks, which regenerated the htaccess file and it removed those lines.

@mimicplay
Copy link
Author

@MikeHansenMe Thank you so much - that fixed it! If you're ever in northern WI, I owe you a beer for your help today :) Cheers!

Oh, I will let Lucy at WP Rocket know that you helped me out with this, and what you needed to do to fix it.

@laurentzahnd
Copy link

Aloha @MikeHansenMe, I have the same issue, I'm using W3 Total cache and I'd like to remove Endurance Page Cache 1.1 and Browser cache 0.4 because it's constantly messing up my CSS and updating my website is a nightmare. I don't know how it got in my plugins because I'm not even a bluehost customer?!
I'm not a coder and need your assistance please.

@sovrinbloc
Copy link

I found a working solution:

I tried migrating my site 3 different ways and it continued to give me 500 errors due to .htaccess corruption. What would happen is i would migrate it, it would work, but then whenever I would save settings, it would re-corrupt everything.

I was about to give up migrating until I figured it out. First, when I migrated my site, once it was up and running, I made a working copy of the .htaccess file. Just in case something went awry I could just revert back and didnt have to migrate everything AGAIN.

(WARNING: FROM THIS POINT FORWARD DO NOT TRY TO SAVE SETTINGS OR RELOAD YOUR PAGE UNTIL AFTER YOU COMPLETE THE REST OF THE TUTORIAL)
Next, I went into wp-content/mu-plugins (for me this is where the Endurance cache plugin is stored, since it isn't displayed in the regular plugins). I moved all of the files (endurance-page-cache.php, endurance-php-edge.php) to endurance-page-cache.php.old endurance-php-edge.php.old.

Next, I created two blank files endurance-page-cache.php, and endurance-php-edge.php inside that very same directory. THAT way, whatever is trying to enable and call those files to display, when it calls them, it will be blank, and nothing is then called, and therefore nothing breaks!. That is the solution.

So if you are using SSH or Linux, my commands looked like following.

(navigate to the mu-plugins directory inside wp-content)
cd /var/www/html/wp-content/mu-plugins/

(copy old files)
mv endurance-php-edge.php endurance-php-edge.php.old
mv endurance-page-cache.php endurance-page-cache.php.old

touch endurance-php-edge.php
touch endurance-page-cache.php

DONE

@cyric118
Copy link

@sovrinbloc I created an account here just to login and say thank you. This damn Endurance plugin has had me banging my head against the wall for three days now. Your solution was so simple, I can't believe I didn't think of doing it myself. So far, it looks like it worked as perfectly as I could hope. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants