Hosting with Rocket-Nginx : WProcket plugin and Nginx

1

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 "https://www.yourdomain.com/wp-cron.php"

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 https://github.com/maximejobin/rocket-nginx.git
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 : https://support.yoorshop.hosting/knowledgebase/3931/How-to-configure-a-site-with-NGINX-PHP-FPM.html )
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

Also Read

How to preview a website before migration ?

This very advantageous technique makes it possible to see one's website on another IP than that...

OpenOffice - LibreOffice

With SSH you can test, it works and is the best solution to implement this command in your php...

Use of Node.Js

For servers in Canada and Singapore, please refer to point 3 here To activate and use Node Js :...

Create a development site with a subdomain

If your domain already uses our DNS, it's very simple : To make a demo shop with us from...

Managed dedicated server

We can offer dedicated dedicated servers in outsourcing with WHM/cPanel, ask us for a quote...