Welcome to Centmin Mod Community
Register Now

Wordpress WP Super Cache Initial Setup Problems

Discussion in 'Blogs & CMS usage' started by nqservices, Jul 22, 2016.

  1. nqservices

    nqservices Member

    70
    14
    8
    Jun 17, 2016
    Ratings:
    +28
    Local Time:
    4:15 AM
    Hi,

    I have just made a clean install of Centminmod 123.08stable (on a VMware VPS server running CentOS 6.8 64bit + PHP 5.6.24 + MariaDB 10.0.26 + Wordpress 4.5.3) and run the 22 Option to auto install Wordpress.

    And after install I begin to follow the final setup steps on the Wordpress backoffice and I had some problems. So I try to describe bellow in a detailed way all the steps I done.

    My objective with this is to someone tell me if this is normal and if WP Super Cache is working properly or if there is some kind of bug or problem with my installation.

    ----------------------------
    Situation Description
    ----------------------------

    After installation was done I have login the backoffice to make the steps to complete the setup and on the step 3, after I click Update Status, it returns a HTTP 500 Error page.

    If I then click on refresh it will open the WP Super Cache > Advanced page with the following 3 issues:

    a) It shows on the top a warning saying:
    Warning! WP Super Cache caching was broken but has been fixed! The script advanced-cache.php could not load wp-cache-phase1.php.
    The file /home/nginx/domains/mydomain.com/public/wp-content/advanced-cache.php has been recreated and WPCACHEHOME fixed in your wp-config.php. Reload to hide this message.


    b) On the Caching menu, I have previous set the checkbox to “Use mod_rewrite to serve cache files.” And now the checkbox is on: “Use PHP to serve cache files. (Recommended)”

    c) The options made on Stop 2 where also lost (ex: Don’t cache pages with GET parameters. (?x=y at the end of a url)

    -----

    The I logout backoffice and login again. Went to the WP Supercache > Advanced Menu and set: “Use mod_rewrite to serve cache files.” And then the 2 following messages showed:

    -> Mod rewrite may not be installed!
    It appears that mod_rewrite is not installed. Sometimes this check isn’t 100% reliable, especially if you are not using Apache. Please verify that the mod_rewrite module is loaded. It is required for serving Super Cache static files. You will still be able to use legacy or PHP modes.


    -> Rewrite rules must be updated
    The rewrite rules required by this plugin have changed or are missing. Scroll down the Advanced Settings page and click the Update Mod_Rewrite Rules button.


    ---
    So I clicked on the “Update_Rewrite Rules” button and the following message show on top: “Mod Rewrite rules cannot be updated!”
    ---
    Then I Logout and Login again the backoffice, went to the WP SuperCache plugin and it still shows the message:

    Mod rewrite may not be installed!
    It appears that mod_rewrite is not installed. Sometimes this check isn’t 100% reliable, especially if you are not using Apache. Please verify that the mod_rewrite module is loaded. It is required for serving Super Cache static files. You will still be able to use legacy or PHP modes.



    Then i check all the other pre-defined checkbox settings defined before and the are now all saved. For example the “Use mod_rewrite to serve cache files. be able to use legacy or PHP modes.” Is enable.

    ---

    So now to test if WP Supercache is working or not I first run the “Test Cache” build in test available on the “WP Super Cache > Easy” menu and the results where ok. Also if I then open my website homepage when checking the source code it will show on the end:

    <!-- Dynamic page generated in 0.161 seconds. -->
    <!-- Cached page generated by WP-Super-Cache on 2016-07-22 01:06:02 -->
    <!-- super cache -->

    ---

    So in a resumed way, besides the initial setup problems and now the Mod rewrite warning all seems to be working properly with WP Super Cache.

    But I’m not sure and I want to know if there is some problem with my setup and also if the Mod rewrite warning is normal to keep showing.

    If from my end you need any further information, fell free to ask me.

    Thanks
     
  2. eva2000

    eva2000 Administrator Staff Member

    55,189
    12,251
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,829
    Local Time:
    1:15 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    not normal
    normal just let the system fix it as mentioned
    takes a few tries to get it to stick, restart php and nginx might help
    takes a few tries to get it to stick, restart php and nginx might help
    normal as mod_rewrite is apache thing not nginx so ignore
    yup working :)

    wp super cache is trickier to get setup, hence why with centmin mod 123.09beta01, centmin.sh menu option 22 moved to default to keycdn cache enabler instead of wp super cache for wordpress installs - same performance just easier to get setup.
     
  3. nqservices

    nqservices Member

    70
    14
    8
    Jun 17, 2016
    Ratings:
    +28
    Local Time:
    4:15 AM
    It's the second server i try and the HTTP500 happen both times. Anyway all seems to be working. But it would be great if someone else could try this.

    Also about the end lines on the homepage of my website that show the WP Cache working
    <!-- Dynamic page generated in 0.229 seconds. -->
    <!-- Cached page generated by WP-Super-Cache on 2016-07-22 02:39:57 -->

    This only show on the homepage. If i open the default sample page and check the source code it will not show this text. So its normal for just to show on the homepage?

    Mote: I wanted to use the Centminmod v09beta but this is a production server so i choose to use the 08stable in order to have the max stability.

    Thanks
     
  4. nqservices

    nqservices Member

    70
    14
    8
    Jun 17, 2016
    Ratings:
    +28
    Local Time:
    4:15 AM
    Also when i go to WP Super Cache page to clean cache it says it has 0 cached pages.

    So i starting to think that something is not right with my setup.
     
  5. eva2000

    eva2000 Administrator Staff Member

    55,189
    12,251
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,829
    Local Time:
    1:15 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    123.09beta01 has been in use on this forum and centminmod.com for over 1yr :)

    you'd have to troubleshoot this yourself - start with incognito browser session and being logged out with browser session and cookies cleared and see
     
  6. nqservices

    nqservices Member

    70
    14
    8
    Jun 17, 2016
    Ratings:
    +28
    Local Time:
    4:15 AM
    I have 09beta running on another development server with CentOS 7. All seems to be working properly.

    But this is a CentOS 6 production server and i was afraid that 09beta may not be stable enough to run Wordpress in production.

    But if you say this you are already running 09beta in production with no problems maybe i will try it instead. My objective is to have Wordpress running in the most optimized and reliable way.

    So your advice is for me to go with 09beta? Also i know release dates are not easy to give, but do you have any idea when 09 will become stable version? Are we talking about 1 month, 3 months, 6 months? This information help me to plan my work in a advanced way.

    Thanks
     
  7. eva2000

    eva2000 Administrator Staff Member

    55,189
    12,251
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,829
    Local Time:
    1:15 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Timeline / Roadmap | Centmin Mod Community ;)

    of course you can try manually switching to keycdn cacher enabler Wordpress - WP Cacher Enabler Plugin by KeyCDN folks | Centmin Mod Community but you still miss out of improvements of 123.09beta01's centmin.sh menu option 22 wordpress install and configuration routines
     
  8. nqservices

    nqservices Member

    70
    14
    8
    Jun 17, 2016
    Ratings:
    +28
    Local Time:
    4:15 AM
    Hi @eva2000

    Ok, i will try 09beta. Let's see how it goes!

    Thanks
     
  9. JarylW

    JarylW Active Member

    216
    41
    28
    Jun 19, 2014
    Singapore
    Ratings:
    +103
    Local Time:
    11:15 AM
    I also run few wordpress sites on beta and php7 (le5 branch then swap back to beta01 later because i want to use let's encrypt on wordpress and having centminmod set cronjob for auto renew script is sweet).

    I also switched over to cache enabler from redis cache (was super cache before redis cache) because it is simpler as he mentioned. Also has separate cache page which output webp image - highest reduction in page payload for me.

    Tldr; used beta with all sorts of plugin setup. Apart from a few of my own silly mistakes, never had any stability related issues.
     
  10. nqservices

    nqservices Member

    70
    14
    8
    Jun 17, 2016
    Ratings:
    +28
    Local Time:
    4:15 AM
    Thanks for the advice. What is the setup you find the best? Also in terms of using a Wordpress cache plugin did you already try the Cache Enabler - WordPress Cache — WordPress Plugins ?
     
  11. JarylW

    JarylW Active Member

    216
    41
    28
    Jun 19, 2014
    Singapore
    Ratings:
    +103
    Local Time:
    11:15 AM
    Yea I am using that - that is the cache enabler I am refering to. Fortunately, centminmod has easy automated way to install it - even has nginx rewrite rules for bypassing php already configured.

    I went on to mount the /wp-content/cache/ directory to tmpfs.
     
  12. nqservices

    nqservices Member

    70
    14
    8
    Jun 17, 2016
    Ratings:
    +28
    Local Time:
    4:15 AM
    Can you please explain to me how can i do that?

    Thanks
     
  13. JarylW

    JarylW Active Member

    216
    41
    28
    Jun 19, 2014
    Singapore
    Ratings:
    +103
    Local Time:
    11:15 AM
    By keycdn people:

    The Cache Enabler stores the HTML docs on the disk. You can use a ram disk to have it even faster. Something like this:

    mount -t tmpfs -o size=1024M tmpfs /path/to/wordpress/wp-content/cache/

    Based on our tests is this approach faster than memcached. So the Cache Enabler does not support memcached natively.
     
  14. nqservices

    nqservices Member

    70
    14
    8
    Jun 17, 2016
    Ratings:
    +28
    Local Time:
    4:15 AM
    Ok and after you setup the SWAP for the /wp-content/cache/ did you disable memcached?

    Also i have been browsing about this DigitalOcean advice is not to use SWAP with SSD VPS servers as you can read at:

    How To Add Swap on Ubuntu 14.04 | DigitalOcean

    Maybe they just want to save their SSD disks to last longer? ;)

    What do you think about this?
     
  15. JarylW

    JarylW Active Member

    216
    41
    28
    Jun 19, 2014
    Singapore
    Ratings:
    +103
    Local Time:
    11:15 AM
    No I did not. Not too sure about swap, sorry
     
  16. raciasolvo

    raciasolvo Member

    98
    11
    8
    Oct 7, 2016
    Ratings:
    +28
    Local Time:
    6:15 AM
    Nginx 1.11.6
    MariaDB 10.0.27
    Strange, but I do not get a speed boost using the tmpfs vs ssd with the Cache Enabler .
    ssd, pre-gziped, swap=0