- Joined
- May 3, 2016
- Messages
- 1,622
- Points
- 83
You have buy a VPS to speed up WordPress, but you are using a control panel and it's not faster than before ? In this tutorial, you will learn how to setup a Blazing fast WordPress with Nginx php7 and redis cache.
This will require to use the the command linux via SSH. Yes I know, it's less user friendly than a control panel.
But it will not require any resources after the install and we have an amazing tools to help us : EasyEngine
So, first we will talk about what we are going to install and why it will make WordPress faster.
Nginx : To pronounce Engine Xâ€, it's the web server created in 2002, created to handle high traffic with a low memory footprint. And this is the reason which explain why Nginx is so popular at the moment. It can also be used as a reverse proxy or as a load-balancer, which means if you have few small VPS, you will be able to create a stable and reliable platform to host your website.
php7 : I will not explain what is the php but more about the difference between the 5.6 and the 7. It's the performance and there is nothing better than a small graphic to compare them. And WordPress is fully compatible with the latest version of php.
MariaDB : If you haven't already used it, MariaDB is a fork of Mysql from his creator, and it's an open-source solution which is currently faster than Mysql with a lower memory and processor footprint. So no need to hesitate, if you are still using msql, even in 5.7, it's time to move !
Redis : What is Redis ? It's a remote dictionary server, which will manage your database and store the values in the memory. It's a NoSQL†solution as Redis can be used as a database by writing data on your hard drive SSD. For WordPress there is no faster solution as it will eliminate the queries to your database, and even if you are using Mariadb, it will be faster and using less resources.
But you are maybe thinking it will be very hard to configure all that stuff properly. No, you will be able to do it in less than 10 minutes ! Because we are going to use EasyEngine, the most powerful tools to create an optimized WordPress website.It's a command line tool to create install and configure a complete web server with Nginx, PHP, MariaDB and Postfix in a single command.
It also provide you the ability to manage properly your virtualhosts with Nginx and make it easy with simple command to use.
So to start you need a VPS with Ubuntu 16.04. EasyEngine is also compatible with debian 7/8 and Ubuntu 14.04.
But as EE has been build at first for ubuntu, it's the most stable solution.At first we need to install EasyEngine.
Code:
[COLOR=#555555][FONT=Lato][INDENT][SIZE=4][FONT=inherit]wget -qO ee rt.cx/ee && sudo bash ee
[/FONT][/SIZE][/INDENT]
[/FONT][/COLOR]
Done, EasyEngine is now ready to install what we need. So we are looking for WordPress with nginx, php7, redis and as it will not be harder, a SSL with let's encrypt. But you have the choice with EE :A simple website for html :
Code:
[INDENT][SIZE=4][FONT=inherit]ee site create example.com --html[/FONT]
[/SIZE][/INDENT]
A website with php :
Code:
[INDENT][SIZE=4][FONT=inherit]ee site create example.com --php
[/FONT][/SIZE][/INDENT]
Code:
[INDENT][SIZE=4][FONT=inherit]ee site create example.com --mysql[/FONT]
[/SIZE][/INDENT]
A website with SSL by let's encrypt
Code:
[INDENT][SIZE=4][FONT=inherit]ee site create example.com --letsencrypt[/FONT]
[/SIZE][/INDENT]
And for WordPress ? You just have to choose :
Code:
[INDENT][SIZE=4][FONT=inherit]ee site create example.com --wp # install wordpress without any page caching
ee site create example.com --w3tc # install wordpress with w3-total-cache plugin
ee site create example.com --wpsc # install wordpress with whisp-super-cache plugin
ee site create example.com --wpfc # install wordpress + nginx fastcgi_cache
ee site create example.com --wpredis # install wordpress + nginx redis_cache[/FONT]
[/SIZE][/INDENT]
So for my example, I will use :
Code:
[INDENT][SIZE=4][FONT=inherit]ee site create yourwebsite.com --wpredis --letsencrypt --php7[/FONT]
[/SIZE][/INDENT]
You will have to enter Yes to the EE questions, and yes your wordpress with redis php7 and SSL is already installed and configured. You also have two plugins in WordPress :
[*=left]Nginx Helper to clear the cache
[*=left]Redis Cache : To connect WordPress with Redis and to clear the cache
You can use a custom user during the install process by using–user=admin and -pass=password to set WordPress login details.
But you can also look at the install log to find them as EE display it in the console :
Code:
[INDENT][SIZE=4][FONT=inherit]nano /var/log/ee/install.log[/FONT]
[/SIZE][/INDENT]
To see all the commands available with the websites :
Code:
[INDENT][SIZE=4][FONT=inherit]ee site[/FONT]
[/SIZE][/INDENT]
If you want to edit some default configuration (database, user etc) :
Code:
[INDENT][SIZE=4][FONT=inherit]nano /etc/ee/ee.conf[/FONT]
[/SIZE][/INDENT]
Code:
[INDENT][SIZE=4][FONT=inherit]ee secure --auth[/FONT]
[/SIZE][/INDENT]
Code:
[INDENT][SIZE=4][FONT=inherit]ee secure --port[/FONT]
[/SIZE][/INDENT]
Code:
[INDENT][SIZE=4][FONT=inherit]ee site info yoursite.com[/FONT]
[/SIZE][/INDENT]
Code:
[INDENT][SIZE=4][FONT=inherit]ee stack install --adminer[/FONT]
[/SIZE][/INDENT]
Code:
[INDENT][SIZE=4][FONT=inherit]ee stack install --phpmyadmin[/FONT]
[/SIZE][/INDENT]
Code:
[INDENT][SIZE=4][FONT=inherit]ee stack install --phpredisadmin[/FONT]
[/SIZE][/INDENT]
Code:
[INDENT][SIZE=4][FONT=inherit]ee stack install --admin[/FONT]
[/SIZE][/INDENT]
[*=left]The File-System Layout
[*=left]The site create command
[*=left]All the tutorials