WordPress is one of the most popular content publishing platform used by some of the very high traffic website. Beauty of the wordpress is in its simplicity. If you will setup your WordPress correctly then your website performance will be fantastic. In this article we will explore various aspect of the WordPress Performance Tuning. Before going further let me clear that why you need to optimize your WordPress website performance.
Why you should spend time on WordPress Performance Tuning ?
Performance tuning or Optimization is required due to following reason:
- If you will correctly optimize or tune your WordPress performance then your visitor experience will be better.
- Search engines are giving high preference to high speed website. So your SEO will be improved.
- Sometime while doing your WordPress performance tuning you will analyzed and remove unwanted thing from your WordPress which reduce your server work. So your server will have less load.
Tool / Plugin / Stuff you need while WordPress Performance tuning
WordPress performance tuning does not mean to only changing some configuration of your WordPress. There are several area where you need to fine tune like apache(your webserver), Mysql etc. So before going further you need following tool/plugin
- Installation of plugin w3 total plugin.
- Firefox web browser with firebug tool.
- Google Page Speed Test or GT Metrix.
- SSH connection to your server (only required if you want to tune Apache and MySQL performance).
- A good Internet speed.
Before going further for your WordPress Performance Tuning please arrange above written tool.
Analyze your WordPress Performance
Before going to optimize your WordPress Performance you need to analyze that whether your website performance is good or bad. Or in other word we can say that you need to check whether your website is served quickly or not. Following are the factor which mainly affect your website performance and you need to check.
- Time taken to load your web page
- Number of CSS, js and Images are getting downloaded on every request
- CSS and JS are placed correctly or not.
You can check your website performance in either Google Page Speed or Gtmetrix. I prefer to use Gtmetrix. Both tool will gives rating to your website Speed and suggestion to improve your website performance further. Gtmetrix will also provide you the timeline waterfall(what is repose time of your website and how many images, css , js or other resources are getting downloaded) of your website. I prefer Gtmetrix because of TimeLine waterfall feature.
You will get following type snapshot for your website in Gtmetrix
In above snapshot you can see the following 4 tab
- Page Speed : In this tab you can find your website performance analysis with GooglePageSpeed.
- YSlow : In this tab you can find your website performance analysis with YSlow.
- TimeLine : In this tab you can find your website page load water fall.
- History: In this tab you can find previous history of your website page speed test if you did the test in in future.
Factor Affecting your WordPress Website Performance
Default WordPress is highly optimized. If you are using default WordPress with default WordPress theme then I do not think that your performance will be bad(if your server is configured correctly). But if you are using custom theme and plugin then you should check your performance. Mainly following things affect your WordPress performance:
- Web server and PHP Configuration
- MySQL Configuration
- WordPress Plugin
- Your Theme
How to Tune Performance of WordPress Website
I hope you have better understanding about your website performance now. In this section we will explore real recipe of WordPress Performance Tuning. There are 3 Part in the performance tuning of your WordPress
- Web Server and PHP Optimization
- MySql Server Optimization
- Plugin Optimization
- Theme Optimization
- Cache Setup
Web server(apace) and PHP Optimization
If you are on Shared hosting environment then you can skip this section because you does not have control over your server. On shared hosting your server is managed by your hosting provider. IF you have hosting from reputed Hosting provider then they always try to optimize your server. If you are on Dedicated Virtual or Dedicated server then you can optimize your web server and php.
To optimize your apache and PHP you can do following things
- Remove unused module from apache keep only minimal module on which you can run your .
- Use correct Perfork setting
- Use Opcode for php I am using APC
- Always upgrade your apache and PHP and keep up to date.
MySQL Server Optimization
Like apache and PHP if you are on dedicated or dedicated virtual server then only you can manage your MySQL. In MySQL you need to check following parameter
- You need to optimize key buffer of your mysql
- You need to optimize table memory
- You need to optimize join buffer
- You need to optimize your table cache
- You need to optimize sort buffer and read buffer.
- Use query cache
If you are not very much familiar with MySQL then always take professional help to optimize your mysql.
On every page load of your website some of the code getting parsed from all installed plugin. So make thumb rule to remove all plugin which you are not using. Following are some rule you can follow in your plugin installation
- Always try to use as minimum plugin as possible.
- Before installing or using the plugin, read the plugin review on internet
- Always test the website performance after and before the plugin installation.
- Always upgrade your plugin to latest version.
If you are getting bad result in gtmetrix for your wordpress website then most of the time it is due to your theme. So be careful before choosing your theme. You can follow following step to evaluate your theme performace before installing the theme and using it
- Always use the theme for which demo URL is available.
- Check the demo URL in gtmetrix. If Demo URL has good speed rank then maximum probability that theme is good.
- Check w3c validation for your theme.
- Always check that JS and CSS is minified or not
Last but not least! You should always setup caching of your website. I must say that the biggest point in your WordPress Performance Tuning is how efficient is your website cache. For your WordPress performance tuning you can setup following type of cache:
- Fragment Cache: Fragment cache is technique to cache particular section of page. This help to reduce the process burden and you will get the better page load time. Plugin like W3 Total Cache and Fragementcache.
- Browser Cache: There are some plugin which can set the browser cache. Mainly they generate .htaccess rule so that your static file like image and media will be served by W3Total Cache.
- Page Cache : Some plugin can cache your wordpress page. They basically generate HTML of your complete page and save it. On every request they check if page is generated then they serve that HTML page. It saves lots of processing time. There are some plugin which can provide you page cache. Best one is W3Total Cache.
- Content Delivery Network: If your website is really very high traffic website then you should use content delivery network(CDN). CDN fetch the page from your website and save it on different location. Also it deliver the page to user from their own location. So load on your web server get reduced dramatically. Also CDN are highly optimized.
Hope you have better understanding on WordPress performance Tuning. If you have any other Idea , Suggestion, Feedback on WordPress performance tuning then please let us know.
Get In Touch