12 Ways to Optimize Speed of Large WordPress Websites
A slow loading site can be frustrating sometimes and ultimately fed up the visitors to shut it down and switch to next one. Whenever new visitors visit your website they first notice the speed of your website (i.e. How quickly it is loading?) and then design.
It has been an issue with the WordPress websites which have a huge number of blog posts and all that results in slow loading speed. Although there are other WordPress websites which handles the traffic easily and run efficiently while loading. If you are having the same issue with your WordPress website here are some useful tips which can help you to solve this matter:
First Thing First: Start with the Basics
Step #1: Use a proper web hosting provider
To work in an efficient manner, WordPress needs specific resources, such as memory or CPU on the server where it is hosted. Sometimes those resources are not enough to function properly. This is often the case of shared web hosting account. Do upgrade your hosting account as soon as you can afford it. It would be better to use a good hosting publisher rather than shared hosting.
Step #2: Use Pingdom Tool: Quickest and the easiest one
Before starting optimization, check the current performance of the website by using Pingdom tool so that you should have some benchmarking figures to compare against after you make the changes and see how it has affected the performance.
The Pingdom Tool tells you about the loading speed of your website. With Pingdom you can identify what areas of a web page are fast, slow or too big, what best practices you are not following. It is too easy to use Pingdom tool. All you need is to type “http://tools.pingdom.com/fpt/” in the URL. There are various tools to check your website’s loading speed like Yahoo! Y slow, Google Page Speed. But I would suggest that the Pingdom tool is the best and the quickest one. It provides a straight forward approach and gives the entire status of your website within no time.
Step #3: Use minimum number of Worpress plugins
Using too many plugins in a website can create an overhead to your blog and slow your website speed. So choose your plugins carefully and use only those which are needed for your website.
Step #4: Delete Spam comments
We need to be extra careful with the wp_comments table. Counting takes a lot of time on big databases. Keeping thousands of spam comments in your database slow down your website. Keep deleting spam comments from your database. You can perform these queries to delete comments from your database.
DELETE FROM wp_comments WHERE comment_approved = ‘trash’
DELETE FROM wp_comments WHERE comment_approved = ‘spam’
DELETE FROM wp_comments WHERE comment_approved = ‘0’
DELETE FROM wp_comments WHERE comment_approved = ‘post-trash’
Although these are five queries but they will quickly remove the comments from the database.
On the other hand if you want to count all the comments from your database then you can write these queries:
SELECT FROM wp_comments WHERE comment_approved = ‘trash’
SELECT FROM wp_comments WHERE comment_approved = ‘spam’
SELECT FROM wp_comments WHERE comment_approved = ‘0’
SELECT FROM wp_comments WHERE comment_approved = ‘post-trash’
SELECT COUNT FROM wp_comments
The last query will count all the comments from the database with in no time.
Step #5: Delete Post revisions
This is a weakness of WordPress. Copies of old post revisions make your database heavier and slow down the speed of your website. Be sure to delete old post revisions. Install Better delete revision plugin to remove the old revisions from your posts and pages.
Back up the wp_posts table and then used a simple MySQL command to remove old post revisions. This decreases the table size from 400 MB to 120 MB.
DELETE FROM ‘wp_posts’ WHERE post_type = ‘revision’ AND post_date NOTLIKE ‘2012-%’
Step #6: Choose your theme wisely
Choose a WordPress Theme that is built by some reputated WordPress theme company, So that you will get a optimized theme for your website. So of the point that must noted while choosing theme You can choose InkThemes for selecting your WordPres themes
- Improved speed
- Built in security enhancement.
- Basic search engine optimization.
- Beautiful designs.You should better take care of updating the theme time to time. SEO features are also included with your theme. To strengthen your SEO it is important to add a custom title to your article/blog.
Secondly Focus on Major Issues:
Step #7: Optimizing the Database
The database is the place where everything about your WordPress is stored. WordPress uses database to store posts, pages, comments, settings and plugin information. Every time a page is reloaded it reads your database. If the database is bloated, the information can take longer to be found and displayed.
This is the main reason why you need to optimize your database regularly especially if you have a large website.
You can use WP-DB manager plugin. This plugin will help you to back up, restore, repair and optimize your database.
Step #8: Optimizing images and widgets
Unnecessary images and videos on the page affect the loading speed of the page. It is better to keep your page size less than 100 KB. Show few images on the front page and put a button there for the rest.
It is also important to know what types of images you can use and when. If you are using simple images it is recommended to use an 8-bit PNG. This makes your images smaller which makes them faster to load on your website. But if you have complex images with lots of colors, then JPG or 24-bit PNG is recommended. By using the proper format you will reduce the size of your images. And when they are downloaded by your visitor’s browser, this operation will be much faster. This will increase your website loading speed. WP Smush.it plugin can be used to reduce the file sizes. Every image you upload should run through a lossless optimization process i.e. there should not be any detrimental effect on the quality of images.
Lazy Load plugin can be used in order to upload the necessary stuffs first on your website and images at last.
Widgets can often put a drain on a page’s load speed because they rely upon 3rd party servers to load. Therefore choosing to lazy load widgets can prevent the rest of your page struggling to load. Lazy widget plugin can be used that allows you to select which widgets are lazy loaded.
Step #9: Use a caching plugin
Caching is a process that is essentially like taking a picture of your content and providing it to your visitors without requesting it from the database each time. Caching converts your dynamically created pages WordPress web pages into a static page. The key thing is to understand is that it makes your pages load more quickly.
WordPress is an entire mechanism and every time you load a page, lots of things happen on the back end. But when we use a caching plugin, this process gets simplified and your content is served from the cache without being generated over and over again. The best plugin you can use to cache your content is W3 Total Cache.
W3 Total Cache plugin will cache your WordPress posts and pages as static files. These static files are then served to users, reducing the processing load on the servers.
Step #10: Use content delivery network
A content delivery network (CDN) helps to deliver your content, images, CSS and Java script files from different locations across the globe. Your content is served from the location that is closest to your visitors, so if your visitor is from the US, then your content will come from a server in the US.
A CDN is a collection of web servers distributed across multiple locations to deliver content more efficiently to users. The server with the fewest network hops or the server with the quickest response time is chosen.
A CDN saves your bandwidth and visitors will experience faster loading speed. You can get a free CDN from your hosting provider.
Step #11: Use gzip compression
Gzip is the most popular and effective compression method and generally reduces the response size by about 70%. Approximately 90% of today’s internet traffic travels through browsers that claim to support gzip. Gzipping reduces the size of the HTTP response and helps to reduce response time. It is an easy way to reduce page weight. You can use the WP HTTP plugin for this.
Step #12: Optimizing CSS, Java scripts, PHP, etc.
- Combine CSS files into one big CSS file as one 50KB file loads a lot faster than five 10KB files.
- Combine Java scripts into one big file.
- Reduce the number of dynamic PHP and HTTP calls (use sub domains to share the load).
- Use external scripts instead of placing tons of code in your header.php file. This allows the browser to cache the script so it won’t have to read it for every other page.