Tools for WordPress projects development

After getting into developing WordPress-based web applications and sites, the first thing I did was to find as many dev-useful software as possible. Tools save you great amount of time when you work on your projects. Proficiency in working with them usually tell apart the professional programmers from the amateur ones. I knew WordPress ecosystem is huge (>23% of sites) but its wealth of dev tools surprised me pleasantly. Here is a list of tools/plugins/software I use during building a standard WordPress theme or plugin. Continue reading “Tools for WordPress projects development”

Hunt for the best WordPress theme on GitHub

There is myriad of free WordPress themes all around the web. On the other hand, only a few of them are developed in the open, on GitHub. Those which are benefit from many contributions all done free of charge by many skilled WordPress developers. This weekend, I went on a mission to find the “best” one, though it’s quite subjective and depends on many factors. Nevertheless, as I browsed through GitHub repos, I stumbled upon several high-quality ones. All of them are well-supported with active developers and I would say even better than a large number of commercial themes. Continue reading “Hunt for the best WordPress theme on GitHub”

LayersWP — First Impression

I’ve finally got to try the new theme builder — Layers by Obox Themes. Upon arriving on their landing page I was pleasantly surprised. They present Layers as a modern, full-featured theme builder. However, there are things that I don’t like about Layers, so I’m going to write a short pros and cons of it. Continue reading “LayersWP — First Impression”

Learning to use roots/Bedrock WordPress stack for deployments

This week I have learned to use roots/Bedrock WordPress stack. I’ll be using it during testing and optimizing WordPress loading speeds. Bedrock is super-useful if you need to have a development and production versions of your WordPress application in the same folder structure. It also integrates Composer so no need to install plugins manually, just specify them as dependencies.

Regular meeting with my supervisor

I had a regular meeting with my supervisor Kamil Maraz. Firstly, we discussed the bachelor’s thesis on a macro level. He pointed out a few deficiencies in my initial proposal. After that, I presented him my new findings about Vagrant and Ansible technology. It can be used to setup and provision virtual machines on which the WordPress performance testing would be undertaken.

All in all, we had a good time and clarified multiple topics about the work. Looking forward to our next meeting.

Tools used for performance measurement and profiling

Now that we have installed all of the required server components, we need to install and make ourselves familiar with multiple performance measuring tools and utilities. The aim of this work is to provide the most accurate results thus we have to use as much benchmarking tools as possible.

Server-side benchmarking utilities

htop

On the hosting server, we will make use of the htop utility to measure the server load (both memory and CPU). To install the htop tool, execute following in your remote console:

apt-get install htop

ab

We need to simulate thousands of visitors’ requests into our hosting server in order to benchmark the software stack performance. We will be using the ab utility. To install the ab too, execute the following commands on your visitors simulating server:

apt-get install apache2-utils

Client-side benchmarking services

GTmetrix.com and Google PageSpeed

Setting up a testing environment

Before we can do any real benchmarking runs, we firstly need to set up our testing environment. For these purposes, we will be using a VPS with Ubuntu 14.04 pre-installed. To reproduce the steps, you can install that version of Ubuntu on your local machine or buy a cheap VPS plan from DigitalOcean.com or any other hosting provider. We will need two of these VPS servers, one for hosting the WordPress-powered web site and the other for simulating real visitors requesting pages on the first VPS. Let us name the first server the hosting server and the second one the visitors simulating server. After obtaining the VPS servers, ssh into the hosting server and execute the following commands.

Installing Apache HTTP and Nginx

apt-get install apache2
apt-get install nginx

You might test if the installation was successful by visiting your VPS server IP address. Apache2 welcome screen should greet you.

Installing PHP and HHVM

PHP v5.6+

In order to install PHP version 5.6+, we need to add a new PHP5.6 PPA.

add-apt-repository ppa:ondrej/php5-5.6

apt-get update # to update the sources list

If the command is not found, it means our VPS server needs additional helper tools. We can install them by issuing following commands:

apt-get install python-software-properties

apt-get install software-properties-common

Now, we can install PHP by running this command:

apt-get install php5

HHVM v3.5.0+

# adding HHVM repository
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449
sudo add-apt-repository 'deb http://dl.hhvm.com/ubuntu trusty main'
sudo apt-get update

# installing HHVM
sudo apt-get install hhvm

Installing MariaDB

Downloading WordPress

Introduction to our work and prerequisites

Before we dive into all the details our work contains, let us outline a brief introduction of the composition of the paper.

Testing environment

Firstly, we need to setup our testing environment. It will include Apache HTTP and Nginx as web serving applications. Then, we will install and setup PHP v5.6 and the latest HHVM to interpret our WordPress .php files. We also need to install and setup a database software. For our purposes we will use MariaDB instead of MySQL as it is compatible with the latter database. We then proceed with setting up the latest version of WordPress. Other utilities such as benchmarking tools will need to be prepared in order to fully and reliably measure loading speed and resource consumption of our WordPress-based web application.

Benchmarking

In the second part of our work, we will undergo several rounds of benchmarks with different configurations on the server side. We will see how the Apache HTTP with HHVM performs against Nginx with PHP, for example. We will try to be very brief in this part of our work so it does not become too long and tedious to read.

WordPress performance improvements

In the last part of the paper, we will be discussing various WordPress performance improvements. We will look heavily into different kinds of caching, both caching on the server and software sides. Performance-enhancing WordPress plugins will be also studied as well as researching the WordPress API documentation for better theme and plugin development as far as the topic of our work is concerned. We also cannot forget to talk about using CDNs, especially CloudFlare.com, which we will study in a great lengths.

Reading prerequisites

The author of this paper assumes that the reader is proficient with working in command line, using Linux-based operating systems and that he or she understands the basic configurations of Apache HTTP, Nginx as well as WordPress-based web applications or sites. In order for the reader to perform and reproduce all the steps outlined in this paper, he will need two Linux-based operating systems with a reliable Internet connection and enough bandwidth. Below is a list of the software the author was using during his benchmarks mentioned in this document:

  • Ubuntu v14.04 server
  • Apache HTTP v2.4.7+
  • Nginx v1.4.6+
  • PHP v5.6
  • HHVM v3.5.0+
  • MariaDB v10.1.1
  • WordPress v4.1
  • W3 Total Cache v0.9.4