About Us

Latest tech world updates and news form all around the world at Mexicom.org


Switch Your WordPress Site to PHP 7 for Increased Performance


A few weeks ago, a customer asked us if newer versions of WordPress had improved performance. Surprisingly, we found there isn’t much literature on this topic. Thinking about it, this makes sense because the performance of WordPress is very dependent on multiple variables — such as themes and plugins — and the volume of content hosted on the site. Our curiosity is now piqued, so we decided to check how WordPress’s core performance changes between releases. First, the idea is to set up a basic WordPress installation for an official release, with only one post, the default theme, and the plugin sets distributed with that release. We’d then run a fundamental set of stress tests against that machine, collect the results, and do it again with another WordPress release.

Setting up the Experiment

We designed the experiment to be repeatable by others — all scripts and tools are open source and can be run independently from DreamHost products. There are three main components:
A script to deploy a specific WordPress version
A module that stress-tests WordPress
The modules used for collecting data and plotting results

WordPress Deployment

To have a repeatable base environment for the WordPress deployment, we opted to use DreamCompute. Using Ansible and the OpenStack shade library, we wrote a simple Ansible playbook that creates a Ubuntu virtual machine, installs the LAMP stack, and deploys a specific version of WordPress. After running the playbook, we now have a fundamental WordPress site. The sites are set up with the default theme for the version of WordPress being installed, with default posts created with the install and with no caching. This step doesn’t necessarily require DreamCompute and could also be done on a shared hosting account or a VPS; all needed for this first part of the experiment is installing WordPress from the release archives.


WordPress Testing

After setting up two test sites — one running WordPress 4.6.6 and another with version 4.7.5 — we performed HTTP load tests against them. Autobench turned out to be a good tool. It’s simple to set up and powerful for generating load (and collecting data). After a few trials, we configured Autobench as shown in this gist to identify where the performance plateaued. This is where the data gets the most interesting, as it could now show whether the different versions plateau at the same number of requests and how they differ when they plateau. If you generate too much load, the statistics you grab are not all that meaningful because your site could take seconds to load at that point and might as well be down. You might not see where the performance differs with too little load, such as handling more requests.

Data Collection and Presentation

Finally, we collected data from the servers and the WordPress versions. Zabbix collects and presents server resource statistics in graphs. These turned out to be less useful than we originally hoped, with all of our tests looking basically identical as far as the resources being consumed. Autobench collects site response time and performance statistics and dumps them into a file; then, Google Sheets can take the statistics from the file and generate a graph.

What Makes For A Good WordPress Installation

Your web hosting provider will allow you to install WordPress within 5 minutes using a free Fantastico script. Once you have Fantastico opened, the program will ask you what domain you want it installed in. What this means is if you own both xxxy.com and rrrtt.com, you will have a choice as to what domain you want your new WordPress site installed on.

Once the domain is set, you can install your site within a sub-directory on your chosen domain. For example, if the install is created on xxx.com, you have the option of making it on a sub-directory named blog (you can name it whatever you like). This means the new WordPress site will be on xxxy.com/blog, and you can have other content besides your WordPress blog on your main domain,xxxy.com. To keep your site secure, the WordPress install has a safeguard allowing you to set a username and password for privacy. After choosing a username and password, the Installation is set to begin. After less than 5 minutes, your new site is up and running.

After Installation, you may need to do a little “house cleaning” to optimize your new site. Your new blog will have an automatic first post called “Hello world.” We will have to go in and delete that post manually so it will not show up on your site like your first post. A Hello Dolly plugin will also be automatically installed. This plugin highlights little quirky sayings in the top right corner. If you want to delete it, we go into the installed plugin section of our blog and deactivate the Hello Dolly plugin.

The permalink setting is one of the first things I would like to do with my new installation changes. The change setting allows the link for new posts to automatically add the post title at the end of the new page URLs. By default, your links will have random numbers and letters at the end of new post URLs. With the settings changed, your new link will look like DomainName.com/TitleOfPost. When you create a new post, there are a few things to remember. You will have to enter a title and make text to enter into the body, of course. However, WordPress comes with other cool features as well.

Some of these features include:

Publish Posts in The Future
Organize Posts Into Categories, Subcategories
Different Formats on How The Posts Will Be Seen On Your Site
Whether or not to add comments

This is why WordPress is considered by many to be the best blogging platform on the web. It is very newbie-friendly. Many features that will enhance your blog, like SEO, link building, commenting, grammar, images, advertisements, and traffic, come with a simple plugin add-on. These “plugins” are complex programs you download and upload to your blog.

Once uploaded, you may have to fill out some simple forms to get the plugin going; however, all of the complex work, which could take hours or even months, has already been done for you. WordPress includes a large responsive community that works together to answer questions, fix problems, collaborate on ideas, etc. If you decide to blog with WordPress, you are in great hands. Difference Between Java and WordPress. Java and WordPress are very different; this is an attempt to compare and see where they intersect.

Geneva A. Crawford
Twitter nerd. Coffee junkie. Prone to fits of apathy. Professional beer geek. Spent several years buying and selling magma in Miami, FL. Spent a year lecturing about psoriasis in Las Vegas, NV. Managed a small team writing about circus clowns in Las Vegas, NV. Garnered an industry award while writing about lint in the financial sector. Spoke at an international conference about getting my feet wet with dust in Libya. Spoke at an international conference about researching rocking horses in Bethesda, MD.