Introduction To Load Testing WordPress

WordPress is the most popular blogging platform used in 2016. It was released in 2003 and became very popular due to its easy installation and configuration. Another factor that led to its popularity is plugins. Developers can create plugins that assist a novice blogger accomplish technical tasks such as displaying Google ads, statistics, analytics, search engine optimization and integration with social media. Despite its popularity WordPress is known to have suboptimal performance. Performance degradation is known to happen when there is large number of concurrent users. Plugins are known to cause performance issues. The best way to remedy performance issues is to load test the website, identify the bottlenecks and then tune the WordPress settings.

If you want to load test your WordPress site, you need a midrange PC client and a Linux server that runs WordPress on Apache and MySQL. Next you should choose a tool for performing your load tests. You can use open source tools such as Tsung, Gatlin and JMeter or you can opt for cloud options from vendors such as BlazeMeter, Dotcom-Monitor, and LoadImpact. The cloud option would be best for non-technical users. After choosing your load testing platform you then need to establish a baseline for your WordPress server. The baseline will tell you the maximum possible throughput of your server. Creating a baseline is not as complicated as it sounds, you just need to create a php script that echoes 10 bytes of data back to the client or virtual user (you can learn more on the DCM official website). Load testing using this simple script will give you data on page load times and the performance of the Apache Server.

You should start with a small number of concurrent users such as 50 and increase it slowly to observe how the site is performing. The load times you get from the simple script are your baseline i.e., the best possible load time from your webserver. Next install WordPress on the server. After installing WordPress you first load test on one blog post and observe the performance metrics. You can also add more posts to the database and then observe the effect of more posts on the load times. Using this data you can determine the point at which performance on your WordPress site deteriorates significantly. You can then use this performance data to tweak your installation so as to boost performance.

Helpful resources:

http://www.webperformance.com/library/load_testing_guide/

dotcom-monitor.com/load-testing

https://www.visualstudio.com/en-us/docs/test/performance-testing/getting-started/getting-started-with-performance-testing