ADD A NEW SITE IN VESTACP NGINX+PHP-FPM+REDIS SERVER (AND INSTALL WORDPRESS)

Continuing our last article on how to setup a lightning fast webserver based on VestaCP with super LEMP configuration of Nginx, Php-fpm, MySQL, and Redis caching. Previously we have told you how you can easily have such configuration making use of VestaCP, a free control panel software that can be installed easily. This time, we are going to show you some basic steps necessary to add a new website, manually install WordPress, and configure Redis caching to boost up site load performance. On top of that, such webserver configuration can also reduce overall system load of your server.

ADD A NEW WEBSITE

Step 1 – Open up your favorite web browser and login to Vestacp administration page at following url:

https://x.x.x.x:8032

or

https://host.domain.tld:8083

and login as Admin using password you’ve setup earlier.

Step 2 – Next, go to Web and then click the “Add Web Domain” button.

Step 3 – Enter your domain name in the Domain field >> choose the IP address you want to assign (if you have more than one IP) >> then click the green “Add Domain” button.

Pretty easy isn’t it? Once done, you will see something like this..

Step 4 – Now you can start adjusting your DNS settings to point to your server. In this example we use default Namecheap DNS manager instead of using Vestacp DNS (by using ns1 and ns2 of my domain). Alternatively, you can also try following our previous guide on how to use Cloudlfare to point your domain to your server.

Step 6 – Fill in all required fields and note down the database name, database user, and its password. Notepad will come in handy for that task. Please remember that both database name and database username will have username_ preffix (e.g: admin_dbname)

In this example we have admin_wordpress as database name, admin_wpuser as database username, and the password above.

Step 7 – Back to Putty or Terminal. Rename wp-config-sample.php to wp-config.php and edit the file using Nano text editor.

1

2

mvwp-config-sample.php wp-config.php

nano wp-config.php

Step 8 – Paste all database credentials you have created before:

Step 9 – Scroll down the page a little bit until you see WP Salt section. Open up your browser and access this url:

https://api.wordpress.org/secret-key/1.1/salt/

Copy what displayed there into wp-config.php replacing the template:

Step 10 – Open up your web browser and access your domain. You will be then presented with WordPress installation page. Just fill in all required files accordingly.

Finally click that “Install WordPress” button.

That’s it. You can now login to WordPress Dashboard using username and password you have defined.

REDIS FOR WORDPRESS

We have our server configured with Vestacp, Nginx, Php-fpm, Mysql, and Redis. We have also installed WordPress on it. Now there’s a secret formula to make WordPress make use of Redis cache mechanism.

Step 1 – Login to your server again via Putty or Terminal and go to the WP Content folder.

Step 6 – Go back to web browser and open WordPress Plugins page. Search and install a plugin called “Redis Object Cache” by Till Kruss.

Install and activate that plugin.

Step 7 – You’ll then be redirected to its main page like following:

Congratulation!! At this point you have installed WordPress on an optimized VestaCP LEMP server. You may notice the sleekness of its page load even without any PHP-based caching plugin.

What’s next? We will try to test above configuration on a production server having a website with a real human visitors. Stay tuned for the next article and see how many visitors VestaCP with Nginx, PHP-fpm, MySQL, and Redis can handle. Do not forget to subscribe or follow us on twitter.