In my previous post I discussed how to to configure WordPress so that it’s super fast. If you haven’t read over that yet I would recommend reading it and then come back over to this post.
In this post I’m going to cover the easiest way to get WordPress up and running on a newly deployed copy of Ubuntu 14.04. We’re going to do this using EasyEngine. Not only is it the easiest way to get WordPress installed on Ubuntu It’s also the easiest way to get a (LEMP) stack installed on Ubuntu.
If you haven’t heard of EasyEngine before, you wouldn’t be the only one. I just found out about it a few days ago. EasyEngine is designed to make it easy to configure your server, create new sites and deploy WordPress.
This method is going to save you a significant amount of time and effort compared to the methods I’ve outlined previously.
If you’re considering moving your WordPress blog from a shared hosting account to your own virtual private server (VPS) I would personally recommend either Linode or DigitalOcean. I currently use them both and they are both reasonably priced and have excellent service. This site is being hosted on a Linode VPS. If you sign up for either one of them using the links in this article and remain a happy customer I will receive a $20 hosting credit. In addition DigitalOcean will add a $10 credit to your account. The methods that I outline here are just as applicable to any other Ubuntu 14.04 server as they are to a VPS with Linde or DigitalOcean.
Log into your Server
Let’s get started first you’re going to need to open a terminal on your server and log in. If you’re not sure how to do that follow your hosting providers instructions.
Now make sure everything on your server is up to date. You may be asked to enter your password again after the first sudo command. At the end of each line press enter.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
“sudo” Allows permitted users to run commands with elevated permissions.
“apt-get update” looks to see if there are any new versions of the software you already have installed.
“apt-get upgrade” actually upgrades the software to a newer version if one was found when you ran “apt-get update”
” apt-get dist-upgrade” will actually download, remove or install software that has been added, removed or upgraded from the distribution
So now everything on your server should be updated, upgraded and better than ever.
This next step is where all the magic is at.
wget -qO ee rt.cx/ee && sudo bash ee
sudo ee stack install
“wget” can download a file from the internet in this case it’s downloading a file and naming it “ee” from “rt.cx/ee” then it runs “ee” in “bash”
The second line tells EasyEngine(ee) to install the stack of MySQL, PHP, Nginx and all the dependencies.
Check if everything is working
Let’s take a look and see if everything is up and running correctly. To do that we’re going to need a web browser.
sudo apt-get install lynx
The first line is going to download and install the lynx text only web browser onto your server.
The second line is going to try to open the default web site being hosted on your server.
You should see something pretty much like this.
Hit “ctrl+q” to quit lynx
sudo apt-get install nano
Nano is a very simple text editor that we’re going to use to edit a configuration file.
Make EasyEngine more secure
I’m going to recommend making a few changed to the default EasyEngine install.
EasyEngine installs some administration tools on port 22222 to a site named 222222 by default that are used for managing PHP and MySQL. I don’t recommend having unnecessary services and applications running. Let’s disable these admin tools. I’m of the opinion that they pose a security risk if you want to re-enable them and secure them via your firewall at a later point you could do that
sudo ee site disable 22222
Here we tell EasyEngine (ee) to disable the site 22222. What ee actually does is remove the symlink for the sites config file for 22222 from “/var/nginx/sites-enabled/”. Think of a symlink as being like the directions or a map to another file.
We didn’t actually delete the contents of the file 22222 we just removed the directions to it from the site-enabled folder. Nginx uses this folder to keep track of which sites it should server.
If at some point you decide that you want to add it back in you can recreate the symlink like this
sudo ee site enable 22222
This tells ee to create a symlink for the 22222 file in “/var/nginx/site-available/” int the “/var/nginx/sites-enabled” directory.
now let make a small change to Nginx config
sudo nano /etc/nginx/nginx.conf
This will open the nginx.conf in the nano text editor. Find the line.
add header X-Powered-By “EasyEngine 2.x.x”
Change “EasyEngine 2.x.x” to something else. Maybe “Fluffy bunny web server” It doesn’t really matter. The reason we’re changing it is that if there’s ever a bug in on of the packages that are installed by EasyEngine that could allow hackers access to your site or server, you don’t want to be broadcasting to everyone on the internet that you’ve using it.
Hit “ctrl+x’ to exit from nano you’re going to be prompted if you want to overwrite and save changes hit “y” for yes.
Hopefully none of this has been too painful so far now were ready to create our first wordpress site on your new server.
Create your WordPress site using EasyEngine
Creating a new WordPress site with WP Super Cache enabled with EasyEngine
sudo ee site create your-site.com –wpsc
With this line you’re telling EasyEngine(ee) that you want to create a new site in this case “your-site.com” and to also install and configure the server side portion of WP Super Cache so that your site will be nice and fast.
You should see something like this
Write down this username and password
Write down the username and password that was created by EasyEngine when you created your site. You can change it once your into your wordpress admin but you’re going need it to get in.
That’s it your new WordPress site is now installed and configured on your Ubuntu server.
You’re going to need to either alter the hosts file on your computer or update your DNS records for your domain before you’ll be able to access your site on your new server. I would recommend creating a free CloudFlare account and using them to host your DNS and use their free content distribution network (CDN). As I’ve outlined in step #7 of my post 7 steps to make WordPress fast.
EasyEngine can do more than just configure WordPress sites. I would recommend on heading over and taking a look at everything at it’s capabilities.
If you need a great virtual server I highly recommend that you
Sign up for a Linode SSD VPS
After reading through all of this you’ve decided that you would rather leave the management of you server in the hands of professionals have a look at
CloudWays offers VPS management on top of DigitalOcean’s network
If you have any comments,questions, suggestions or problems please leave post a comment here.
Mitesh Shah says
Glad to know you like EasyEngine.
Also can you tell us what security risk you found in 22222 port so we can fix that.
Also to disable/enable any website EasyEngine has a command for that
ee site disable 22222
ee site enable 22222
Benjamin Knigge says
Thanks for the tip. I’ll update the article. It’s not that there’s a specific risk associated with the port 22222 it’s just that it creates another target for attackers and the fact that access to these tools would give them access to the database makes it even worse. I don’t think that most people interested in setting up WordPress need or want these additional tools enabled on their server. The apps on 22222 should be disabled by default. When I secure a server a disable anything that isn’t needed and only allow access via necessary ports through the firewall.