How to speed up Wordpress.
To speed up wordpress is often an easy task, although it takes a little reading and learning. Of all the available CMS platforms WordPress is by far the most used platform of all. About 20% of all websites on the internet use WordPress and of all the websites which use a CMS, 60% uses WordPress. This is also one of the reasons there are many good optimization plugins and “tricks” available. The problem with WordPress is that it can get really slow when you leave it in its original install form without tweaking it. All in all good reasons to list the best ways to speed this CMS up on your own.
Use a cache plugin
Every time a visitor loads a page on your site, WordPress looks for the freshest version of that page. This means it has to continuously load the database to retrieve this fresh information. In most cases this loading of the database is totally unnecessary because most pages do not change often after they’ve been created. A cache plugin fixes this problem by making a static copy of your pages and delivering it to your visitors, without loading the database with every visit, also known as caching. This speeds up the loading times of your pages significantly.
One of the best plugins is WP Super Cache. Many people also use W3 Total Cache which is a great plugin as well. There are various other cache plugins which you can use as well.
Use WP Optimize
WP Optimize is a great little plugin which helps you clean and minimize your WordPress database. You can optimize your MySQL database, empty the trash, remove post revisions, delete spam comments, remove pingbacks and trackbacks with one simple click of the mouse. With some websites it has reduced the database size by 80% or more. This can greatly improve speed, especially when your database loads often. Use this plugin with caution, do not clean/delete things you aren’t sure of.
Enable caching in the .Htaccess file
More information about caching to make your website faster can be found here.
Enable WordPress Gzip compression
Enabling Gzip compression will compress your pages to a much smaller Gzip file format, sometimes as much as 75%. This compressed version of your pages are sent to the visitors browser (all browsers support it) which will decompress it and display the page correctly. This will speed up your website because the Gzip file is smaller as the original page. To enable Gzip compression in WordPress you simply visit http://yourwebsite.com/wp-admin/options.php in your browser, find the gzipcompression setting and change it from 0 to 1. Use the Gzip Compression Test to check if it works.
Minimize the use of social media buttons
Every social media button (Facebook, Twitter, etc.) requires the browser to load all the necessary files from the website of the particular social media site. This can add a lot of extra load time and HTTP requests. If you insist on using the buttons you should always host them on your own site.
Minimize plugins & disable slow ones
Some plugins can greatly decrease the loading speed of your WordPress pages. Uninstall plugins you do not need. Always test a plugin before you use it. If it slows down your website, try to find a different way of fixing the issue the plugin helped you with. Use P3 Plugin Performance Profiler to detect which plugins are slowing your website down.
Optimize your images
By minimizing the disk size of your photos and images you can speed up the loading times of your pages. There are various tools to do this. Top optimize PNG images or JPG images for the web you can use the PNG Compressor or the JPEG Compressor, sometimes it can reduce the size by 50% or more. One of the most popular plugins for WordPress is EWWW Image Optimizer plugin. This plugin uses most of the available image compression techniques(optipng, jpegtran, pngquant, pngout, and gifsicle) with a simple click of the mouse. There are also other good plugins available like WP Smush.it.
Use CSS image sprites
Most websites use a variation of images in the design of the theme or for certain functions. Every time these images load it adds extra HTTP requests. One way to minimize the amount of HTTP requests is to use CSS sprites. CSS sprites give you the ability to combine several images into one, while still using them individually in different places on your page by using X and Y coordinates defined in a CSS script. This way you only have to make 1 HTTP request to load multiple images. Use the CSS Sprites Generator to create sprites, as well as instructions to place them on your site.
Lazy load photos
You should lazy load your photos for a faster visitor experience by improving your initial view content loading.
For help with Javascripst go here. About CSS files; most WordPress themes load multiple CSS files, sometimes as many as 10 or more in the header. This adds unnecessary HTTP requests which can affect website performance. Copy the code of all the CSS files and add it to one CSS file. Now go to the WordPress Editor, open the header.php code and replace all the CSS lines with one CSS code which points to the big CSS file. Or, even better, copy the code from the big css file and instead place it inside the header in style tags like this:
<style> the CSS code </style>
This will load your page even faster.
You can also use the CSS Compressor to minimize the size of your code significantly. Make a backup of your code before you use this tool though, it will mess with and change the structure of your code to make it the smallest possible.
Use a HTML Minifier plugin
Use a plugin which can automatically minify your HTML code for you. A great one is WP HTML Compression. It works great on most websites and has very few bugs. Try it on your own sites if it works for you.
Use asynchronous scripts
Using asynchronous scripts will increase the load speed of your website because the loading of the ads does not interfere with the loading of the page. In short this means that even if these scripts load slowly your page can finish loading and be seen by your visitors without loading the script first. See here for more information.