How To Setup up a VPS for WordPress (Introduction)

How To Setup up a VPS for WordPress (Introduction)

In this series we will be going through the steps of setting up and optimising a virtual private server (VPS) for a large capacity WordPress install.

Table of Contents

  • Introduction
  • Setting up a new VPS – OS, User Accounts and Security
  • Setting up a firewall – Linux IPTables
  • Adding a Caching Server – Varnish
  • Further Optimisation – CDNs, Cloudflare

Introduction

Since quite recently we have been posting out quite a bit of content relating to optimising websites and their hosting, we are pleased to announce that over some time in the near future we hope to release a tutorial series on optimising a virtual private server or VPS for a WordPress install. The ensuing series will be aimed at both beginners and intermediates in the field of self hosting a web server.

We hope the series will allow you to firstly set-up and then optimise a linux web server of your own, and then later manage it by applying update and performing general web server maintenance. Throughout the series we will be using a VPS provided by Digital Ocean which means we will also be going through the process of installing and configuring a web server such as Apache.

How To Setup up a VPS for WordPress (Introduction)

Not only will this series cover the set-up of a web server we will also be covering managing and optimising a WordPress install, this will include plugins to speedup WordPress through the use of add ons such as W3C Total Cache and ensuring that a WordPress install is secure from intruders. Next we will discuss the use of caching servers such as Varnish, to serve static pages rather than dynamic pages.

We will be posting the next parts of the series throughout the next few months, and we will try to keep them to a regular schedule, although this will depend on whether or not we have to give time to other commitments. To keep up to date with the series you can follow us on Twitter, Google+ or Facebook or if you’d rather, you can subscribe to our RSS feed.

Upgrading to PHP 7 on CentOS 6

Upgrading to PHP 7 on CentOS 6

After only recently realising we were running PHP 5.3, a release that came out a good seven years ago, we thought it a good time for an upgrade. Unfortunately due to CentOS’ stance on long term support, rather than the bleeding edge, this task at first proved quite difficult. As of now for CentOS 6, and I believe CentOS 7, there is no readily available package for upgrading to PHP 7.

Much to our luck we eventually came across an article going over the details of setting up PHP 7 on a CentOS Virtual Private Server (VPS), I’ve included a link to said article at the bottom of this post.

Installing PHP 7

Installing PHP 7 went surprisingly smoothly. The first requirement was to remove what was the currently installed PHP Apache module. To do this we entered the following command:

yum remove php*

Upgrading to PHP 7 on CentOS 6

The above command removes all installed packages beginning with PHP, before you do this we do very much recommend you take a backup of everything first just in case anything goes terribly wrong.

The next step involves downloading the latest version of PHP 7, which at the time of writing this article is PHP 7.0.2. The following command downloads the latest PHP repository to your current directory:

rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

The final step assumes you will be using PHP for a standard WordPress installation:

yum install php70w php70w-opcache php70w-mysql

If everything has gone as expected a simple restart of your Apache server should result in a working PHP installation. To check whether PHP 7 has installed correctly we’d recommend running the phpinfo(); function.

Conclusion

As we use Cloudflare to aggressively cache our blog’s pages, upgrading to PHP 7 had very little impact on our frontend performance. Those of you who aren’t currently using a CDN or some form caching should see their page loading times half.

Having said the above, our WordPress admin is certainly much more responsive.

Links

https://webtatic.com/packages/php70/