Hosting with Rocket-Nginx : WProcket plugin and Nginx


NB : you must desactivate any other cache system before proceeding

1. Basic optimization of Wordpress recommended :

Add in wp-config.php:  define('DISABLE_WP_CRON', true);

and cron : */15 * * * * wget -q -O /dev/null ""

You can verify proper working with log output :

/usr/local/bin/php /home//youruser/pathfoldernameofdomain/wp-cron.php -vvv 2>&1 > /home//youruser/pathfoldernameofdomain/cron.log

2. Install Rocket-Nginx with shell (putty)
(request shell access if not enabled, see our dedicated article to shell/SSH) 

Replace 'youruser' by your user login cPanel, and 'pathfoldernameofdomain' by the folder name of website ('public_html' if this is the main domain of cPanel account) :
cd /home/youruser/pathfoldernameofdomain OR cd /home/youruser/public_html
git clone
cd rocket-nginx
cp rocket-nginx.ini.disabled rocket-nginx.ini
php rocket-parser.php
cp -p default.conf ../nginx.conf

3. In your cPanel, go at bottom to icon to Nginx-Manager :
Nginx cPanel plugin
Config: choose the domain to configure, and click on Configure
After, you reach the panel with all settings for the concerned domain, see below :
Default config Nginx
By default, your account is set to run with httpd (point 1), which correspond to PROXY at point 2
Recommended : stay with UPSTREAM httpd with default template YOORshop Defaut
If you want to use UPSTREAM PHP, this will add complication due to .htaccess, please refer :
(Ref : )
Next, once you changed UPSTREAM to PHP, make sure that template used is YOORshop Wordpress
Check now in 'Content Optimization', with both UPSTREAM PROXY/PHP, you must let 'set expires header' to disabled, click at bottom on button 'Save settings'

(If the files on your site are not in the root directory of the domain, you will have to use Subdirectory Applications by giving the name of the subfolder, and choose the TEMPLATE : Wordpress in subdir)

Still in Nginx-Manager, restart from beginning, choose the domain.You need to load properly your new file nginx.conf (line nginx.conf)
You will see a confirmation or not if what you have entered is invalid or need reload nginx : Invalid/Require Reload, click on Reload button of line below 'nginx.conf reload'. If all ok, you will see on line nginx.conf : Valid

That's it ..rocket nginx is now activated for the account. User can change rocket-nginx.ini and regenerate new nginx conf and activate it if required too