Deploy WordPress site after finishing testing it on your local computer is very important to make it available for everyone. You may be wondering “Which is the best way to do that?”, with the best, I mean simple, quick and optimized. The answer is using EasyEngine.
What is EasyEngine?
EasyEngine is a collected Linux shell-script which allows you to manage WordPress on NGINX all automatically and easily as its name. You don’t have to deal with many complicated web server configurations and leave some security holes.
If you don’t know what is NGINX, then I will take this short quote of the definition from Wikipedia: “NGINX (pronounced “engine x”) is a web server with a strong focus on high concurrency, performance, and low memory usage. It can also act as a reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer and an HTTP cache.” which I consider, is very accurate meaning about NGINX.
Focusing on high concurrency, NGINX proves that its performance is better than Apache – very popular web server. If you are still in doubt, reviews from very famous companies are a good reference for you.
Deploy WordPress site
In previous articles, I have given you the introduction and instruction on the ways to create, choose and set up a WordPress site. Now, your site should already be ready to publish online for access.
In this post, I will use a VPS provided by Amazone Web Service (AWS) – EC2 (Elastic Cloud 2) cause it is free and comes with officially detailed settings by EasyEngine.
A short sum-up preparation for your Ubuntu server:
- version 14.04 LTS (HVM or PV)
- Instance Type – choose what you want (1GB ram for free tier)
- Shutdown Behavior – set stop
- Add storage as you want (30GB or less for free tier)
- The other options are optional, you can leave them as default
In order to run your website under a real domain name, please buy one domain name – my recommendation is to use Namecheap for that and point your domain name to the current server.
Now, let do the “automatically” part.
First, log in to the server using SSH, if the server runs on AWS and the PEM key file is required. Connect as its instruction:
#Change permission of key file
chmod 600 key.pem
#Connect to instance ssh -i key.pem ubuntu@<public-ip-of-ec2>
Now, inside the server, install the EasyEngine script and fulfill its requirements:
wget -qO ee rt.cx/ee && sudo bash ee
Then, install WordPress:
sudo ee site create [Your domain name here] --wp
Waiting for a while when the script is running the auto commands until finishing. The installation and set-up of the NGINX server and WordPress site are done all with only two script lines.
Above are the basic options to install a basic WordPress website, EasyEngine is far more power than those, let take a look at some other powerful commands to create a WordPress site with the Multisite option, cache plugins and more.
Install website with cache
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
Install WordPress Multisite
ee site create example.com --wpsubdir # install wpmu-subdirectory without any page caching
ee site create example.com --wpsubdir --w3tc # install wpmu-subdirectory with w3-total-cache plugin
ee site create example.com --wpsubdir --wpsc # install wpmu-subdirectory with wp-super-cache plugin
ee site create example.com --wpsubdir --wpfc # install wpmu-subdirectory + nginx fastcgi_cache
ee site create example.com –wpsubdir –wpredis # install wpmu-subdirectory + Nginx redis_cache
Install WordPress Multisite with subdomain
ee site create example.com --wpsubdom # install wpmu-subdomain without any page caching
ee site create example.com --wpsubdom --w3tc # install wpmu-subdomain with w3-total-cache plugin
ee site create example.com --wpsubdom --wpsc # install wpmu-subdomain with wp-super-cache plugin
ee site create example.com --wpsubdom --wpfc # install wpmu-subdomain + nginx fastcgi_cache
ee site create example.com --wpsubdom --wpredis # install wpmu-subdomain + nginx redis_cache
Define WordPress user administrator password
ee site create example.com --pass=password
EasyEngine will automatically set your administrator password as WordPress does if above step has not been implemented.
One last thing for those who also use AWS EC 2 like me, you might face to the trouble on connecting the Filezilla sftp to the server then, here are instructions for you:
- Select Filezilla preference
- Under the SFPT option, choose to add key file and insert your PEM key file, convert your PEM key file as requires
- Click ok and back to Site Manager
- Choose Login Type: Normal
- Leave the password and click ok. If anything prompt, click ok and then it is connected
Install and deploy WordPress site is very convenient with Easy Engine, it makes this complicated work easy and fun as its name. In the next article, we will discuss plugins which are useful for a WordPress site. See you then!