This blog post is part 1 of 3 which will detail some of the steps we took to improve this site’s performance. You see, we’ve been running this site for more than two years now and it’s only recently that we’ve seen better results. During the last two years, we starting with shared hosting and but because of heavy traffic loads, we switched to virtual dedicated server.
Our blog isn’t big when compared to others so we couldn’t afford to move to physical dedicated. In fact our virtual dedicated server has 4GB RAM, 500GB storage with AMD 4 cores CPU. Nothing fancy.
So what did we do to improve our blog performance? Here’s a brief story.
We started running WordPress on the LAMP (Linux , Apache, MySQL and PHP) stack. For some reason while running Apache, the site would frequently crash and hang for no apparent reason. This happened almost daily. I will always have to connect via SSH and reboot the server to bring the site back online. This wasn’t cool at all. And we knew there was a better way.
So, with the same hardware, we decided to switch to Nginx web server instead since Apache was killing us. I am not telling you that Apache isn’t good and that you should switch. I am only saying it didn’t work for our site.
Before we switched, we backed-up the website’s content and its database and copied it to a remote server. It took us about 6 hours to move all the data. To learn how to backup WordPress content and its MySQL database, read this post and this post.
After the content and database were moved, we re-installed the OS with the bare minimum without Cpanel or Plesk. Just the bare OS with noting extra installed.
Depending on your OS, the commands may be different but here’s how to install the required packages in Ubuntu if your host environment is Ubuntu. If you’re running other OS, check the commands.
First we installed Nginx Web Server by running the commands below.
sudo apt-get install nginx
Next, We install MySQL Database Server. You may be prompted to create MySQL root password.sudo apt-get install mysql-server
Finally, we installed PHP and all its cool plugins.sudo apt-get install php5 php5-cli php5-common php5-xmlrpc php5-mysql php5-gd php5-fpm
Your server now has all the good stuff to get WordPress running. This is just part one of this series. In part two, I will show you how we configured Nginx and PHP to get the best results.
Until then, please come back.