WP Super Cache – Blank Home Pages (Cache) www and non-www

Home Forums BulletProof Security Free WP Super Cache – Blank Home Pages (Cache) www and non-www

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #15061
    UDPride
    Participant

    Hi-

    I have four or five WP installations and they all use a WP Super Cache along with BPS.  Over the last 6 months or so Ive noticed that all of them more or less behave the same way:
    – After about 48hrs the WWW and non-WWW home pages are no longer accessible. The only way to correct this is to go into WP Super Cache and clear the Delete Cache and Delete Expired. This usually solves it for another 48 hours or so.
    HOWEVER
    – In the case of a couple web sites, doing so will render the WWW home page to be functional again, however the non-WWW domain name home page will continue to display a blank page. I have not even found a workaround for this, but I suspect its related to the above issue.

    Considering the same issues are happening across all sites and spread across more than one hosting provider, I have to assume WP Super Cache and BPS are not playing nicely, or I have not set them up properly to play nicely. The routinely manual emptying of cache is not really a solution because I often forget or the home pages go blank before I do remember to delete the cache. And in the cases where WWW will work but non-WWW will not work even with cache clear/delete, I need a permanent solution to solve that because many folks — like myself — like to shorthand URLs and I feel Im losing traffic because non-WWW is habitually blank.

    Thanks in advance for any assistance one might provide.

    #15063
    AITpro Admin
    Keymaster

    I have to assume WP Super Cache and BPS are not playing nicely

    Close! WP Super Cache and WordPress itself on your particular Host Server are not playing nice. ūüėČ ¬†We experienced the same problems with blank Home pages and other random blank pages when using WP Super Cache, but typically/usually the Home page. ¬†We were regularly manually deleting the corrupt cache since the timer did not work. ¬†We tried everything we could think of over several months and across several different test sites. ¬†Some test sites with BPS installed and others without BPS installed – the same blank home page issue occurred on all test sites with or without BPS installed on them. ¬†Long story short we no longer use WP Super Cache due to the issues we were experiencing and instead created this .htaccess Browser Cache code: ¬†http://forum.ait-pro.com/forums/topic/htaccess-caching-code-speed-boost-cache-code/

    We¬†are currently working on something very HOT¬†that speeds up page load times by .5 to 1.5 seconds (in addition to the Speed Boost Cache code). ¬†That is all I can say about this new “thing”. ¬†It is a long way from being publicly available.

    In all fairness to WP Super Cache we do see that other people are experiencing the same problem with blank home pages, but not everyone so it may be a Host specific thing.  ie something about a particular Host’s Server configuration.  ie APC cache or some other type of caching on the Server or something else just does not play nice with WP Super Cache.  Our Host is Go Daddy so maybe whichever Host you have then the same thing is occurring on your Host Server.

    So to sum everything up – if you are a coder and want to spend some time on writing code or a plugin for WP Super Cache then what you need to do is figure out why the “delete corrupt cache timer” feature is not working in WP Super Cache and create either code or a plugin that will fix that or take control of it to make it work. ¬†That would mean you would not have to check your home page manually every 15 minutes like we were doing for months while trying to get WP Super Cache working.

    #15069
    UDPride
    Participant

    The web sites in question are hosted by Host Gator and Wired Tree. Usually code friendly, but?

    Unfortunately I am not a coder so I would not be the one to code a solution.

    Is one potential solution to just deactivate WP Super Cache?  These are not high-volume web sites so we are not talking 10s of thousands of htis/page views a day. Fast is obviously always better, but I think the sites could survive w/o the caching. Would this solve the issue?

    Or, if nothing else, de-activate WP Super Cache and test to see if the issues go away? I think on one site I have the Super Cache code inserted into the BPS box where its supposed to go, but, the problem still persists — which may corroborate your conclusion that its between WSPC and WP.¬† Its just strange that I never seem to run into this until I installed BPS on all the sites. Been building WP sites for years and past sites with WPSC years ago seemed to run ok.

    #15070
    AITpro Admin
    Keymaster

    UPDATE: BPS Pro 13+ and BPS 2.0+ versions have a feature called: Setup Wizard AutoFix (AutoWhitelist|AutoSetup|AutoCleanup) that automatically creates plugin and theme whitelist rules and automatically sets up and cleans up caching plugins htaccess code.

    Yeah we spent several months trying to figure out what we could do to solve the problem using the tools/settings within WP Super Cache and could not find any combination of settings that worked.  We extensively looked at how WP Super Cache and BPS interact with each other and the only interaction is that both plugins share .htaccess files and .htaccess code.  There is not any BPS .htaccess code that adversely affects WP Super Cache or that could cause the corrupt blank page caching problem.  What we did 100% conclusively discover is that the corrupt / blank cache problem originates from shady activity against your website.  ie a bot is scraping or mining your website or doing some other shady activity, which then triggers corrupted cache pages to be created.

    What we found out after benchmark testing our Speed Boost Cache code and comparing it to WP Super Cache Browser caching is there was not difference in speed.  Page caching did speed up our sites about another .3 seconds, but unfortunately we cannot afford to have random blank pages so using our Speed Boost Cache guarantees faster website page loads and most importantly no problems.  So if you want my honest opinion and you do not want to worry about random blank pages then just use our Speed Boost Cache code.  It is reliable and will not cause problems, but it is obviously only Browser cache code.

    Now take a look at this link below using Firefox and Firebug or webpagetest.org. ¬†This is not a tactic to get you to the BPS Pro purchase page. ¬†It just so happens that we are using our new “thing”¬†on this page since it is obviously a very important website page. ¬†The first load is not that great overall, but¬†all the following cached loads are pretty spectactular. ¬†On Firefox we are seeing even better results then the results on webpagetest.org.

    http://affiliates.ait-pro.com/po/

    Document Complete Fully Loaded
    Load Time First Byte Start Render DOM Elements Time Requests Bytes In Time Requests Bytes In
    First View 2.242s 0.749s 0.000s 440 2.242s 43 655 KB 2.351s 43 656 KB
    Repeat View 0.550s 0.161s 0.000s 440 0.550s 5 37 KB 0.550s 5 37 KB

     

    #15071
    AITpro Admin
    Keymaster

    One thing that one of our guys thought that might be a factor in the equation was FastCGI, but this was not proven conclusively.  It is worth looking at since logically it could be a factor.  Other things to consider could be PHP configuration settings, Zend, PHP version, other server side stuff.

    Another approach that may work is to use the WP Super Cache manual page cache creation tools and then do not expire the cache/set an expiration date and do not use the garbage collection timer.  By doing that you will have good cached pages.  You would then manually delete or create cache at later times.  In other words, do not use any WP Super Cache automation and instead control everything manually.

    #20632
    Jonathan Simard
    Participant

    I was trying to cache my site (with Wp Super cache), I played with permalinks, updated the .htaccess file with custom code… But somehow, while playing around with all these new setups (for me), I now have the problem that I can’t revert and/or uninstall BPS, can’t change permalinks (just saving it without changing anything wrecks the site), can’t revert to default .htaccess file. I even reuploaded all my files from my backup to the server and nothing changes. I still have code about Wp super cache in my .htaccess file but can’t erase it. Also, when I use ‘activate” buttons on security modes, it always wrecks the site. I can’t access neither the dashboard nor the site itself. The best thing I can do is reupload the .htaccess from my backup to the server and login again.

    When I say “wrecks” the site, in the beggining it was a blank screen saying that wordpress needed a database. Now, it’s just the “site under construction” default screen of my hosting, as if there was nothing. I hate it when I don’t understand what is the problem, I red all the documentation but I miss something… Your help would be really appreciated.

    #20637
    AITpro Admin
    Keymaster

    UPDATE: BPS Pro 13+ and BPS 2.0+ versions have a feature called: Setup Wizard AutoFix (AutoWhitelist|AutoSetup|AutoCleanup) that automatically creates plugin and theme whitelist rules and automatically sets up and cleans up caching plugins htaccess code.

    @ Jonathan Simard – Do these steps below:

    1. Use FTP or your web host control panel file manager and delete the .htaccess file in your WordPress installation folder.
    2. Login to your site and go to the BPS Security Modes page and Deactivate Root Folder BulletProof Mode.
    3. On the htaccess File Editor tab page, click the Unlock htaccess File button and the Turn Off AutoLock button.
    4. Deactivate and activate the WP Super Cache plugin and resave all of your WP Super Cache settings.
    5. Go to the BPS htaccess File Editor tab page and copy the WPSC htaccess code in the “Your Current Root htacces File” editing window to this BPS Custom Code text box: CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE, click the Save Root Custom Code button,¬†go to the BPS Security Modes page and click the Root Folder BulletProof Mode Activate button.

    #20656
    Jonathan Simard
    Participant

    I can’t access my dashboard after deleting my .htaccess file…

    #20662
    AITpro Admin
    Keymaster

    Do these steps:
    1. Download this file to your computer: /bulletproof-security/admin/htaccess/default.htaccess
    2. Download this file to your computer: /wp-config.php
    3. Edit your wp-config.php file and remove/delete all WP Super Cache code. It will be at the top of your wp-config.php file and say something about “cache”. After editing it, upload the wp-config.php file back to your WordPress installation folder.
    4. Upload the default.htaccess file to your WordPress installation folder and rename it to .htaccess (remove “default” from the filename).

    #20665
    Jonathan Simard
    Participant

    Done exactly as stated but I come across the same screen than before when I try to login (can’t even view the login page). Here’s what inside my .htaccess:
    [code viewed and deleted from this Topic]

    And what’s in my config.php:
    [code viewed and deleted from this Topic]
    Thank you very much !

    #20668
    AITpro Admin
    Keymaster

    The code/files looked fine so it does not look like this is a BPS plugin problem and probably not a WP Super Cache plugin problem either.  I think you should probably just restore your website from a backup at this point since you cannot backtrack the settings changes you made prior to your site going down. Also you should check with your Host support just to rule out a hosting server problem.  It is always possible that at the same time you were doing something that your Host server crapped out.

    #20701
    Jonathan Simard
    Participant

    I contacted my hosting provider and the problem we found is that in the generated root .htaccess there were two line codes missing:

    AddHandler php53 .php
    Action php53 /cgi-bin/php53.cgi
    

    But I also verified my other wordpress sites and these lines aren’t there either and they work fine… Wonder why…

    #20702
    AITpro Admin
    Keymaster

    The other sites may be on different hosting servers or servers that are configured differently. ¬†A host server can automatically define and load the php handler in the server’s httpd.conf file or allow or not allow php handlers in .htaccess files. ¬†It just depends on whatever the server admin of that particular server has chosen to do, not do, allow or not allow.

    Do these steps to save your php handler htaccess code to BPS Root Custom Code so that it will be saved permanently and this problem will not occur again.

    1. Copy your php handler htaccess code to this BPS Root Custom Code text box:  CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE
    2. Click the Save Root Custom Code button.
    3. Go to the BPS Security Modes page and click the Root Folder BulletProof Mode Activate button.

    #20703
    Jonathan Simard
    Participant

    I did add the lines in the custom code and I could generate both wp-admin and root .htaccess files ! But all my sites are with the same hosting, I assume they all have the same name servers… but wait… I changed some to cloudflare not long ago, could be the issue here ?

    #20705
    AITpro Admin
    Keymaster

    Yes. That is a possibility.  Something could be configured at the server level that checks if cloudflare is in use and does something different if it is.  This is a generic/rough/plain english example and is not trying to be technically correct or code correct Рjust a ballpark general idea of a possibility.

    If cloudflare is in use on Website A then load X / do X else do Y / load Y.

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.