WordPress can get very slower when it comes to loading the page, especially if you are using a bad theme, or if it’s bundled up with tons of plugins, custom post types or many blog posts. Luckily, there are some tips that you can use, and increase your wordpress page speed up to 500%. So here it’s what you should do.
1.Switch from shared hosting to VPS
Yup that’s right! This is and will always be the number one tip. If you expect your blog to grow, and have a lot of visitors, then you should invest some bucks in it, and consider switching from shared hosting to a Virtual Private Server (VPS) at least.
Here’s what you should know about shared hosting: When you are using shared hosting, you basically are sharing the resources from one server, with up to 500 other people. Why? Because big hosting companies only care about their profit, and they are keep selling resources from that server to as many people as possible. Now, you don’t have to be a rocket scientist to see where this is going: your page will load very very slow and you will keep losing visitors, as nobody likes a slow website.
When it comes to VPS, you are also sharing the resources from one server. Only this time instead of sharing the same server with 500+ people, you are sharing it with 10-20 people. Now this will make a huge difference, as the server will never get that high overload as in shared hosting, you will have some dedicated resources for yourself (CPU, RAM etc), and your page speed will highly increase.
Where to buy VPS from?
But now comes another problem: Where should you buy a VPS from? I’m not gonna lie, I spent some time myself before finding the perfect VPS, as there are tons of companies that provide this service, making it difficult in choosing a VPS that suits you best.
All I can say, it’s don’t choose the big dogs out there like BlueHost (Yeah I know it’s recommended by WordPress.org but lately their host is working horrible – you can google for more details), GoDaddy, Hostgator etc. Over the years, I have tried all of them, and I can say it’s that I am not impressed at all, and I was seeing almost no difference between shared and VPS.
If you want to choose a very good VPS, I would highly recommend using InMotionHosting. Why? Few simple reasons:
- I am using it on herowp.com and I am very satisfied with the load time of the page and speed, as you can see for yourself.
- It has the same price like the competitors, but has a huge advantage – it offers FREE SSD (20 x faster than regular HDD) instead of regular HDD drives.
- Their support is amazing fast, and they will help you solve any problem in no time, and even install modules for you on your WHM at no cost.
- They also offer free migration from other hosting companies, if your website is under 5GB
- You can choose the data center yourself, for a zone that suits you the best
- They have a 90 day money back guarantee so if you are not satisfied you can discard at any time.
2.Minimize HTTP requests
Minimize what? Don’t be scared, HTTP requests are just the files fetched by your browser(such as images, CSS files, JS files etc) in order to render and display the page you are visiting. If you have few HTTP request your page will load very fast. The more you’ll have, the more is to process for the server, resulting in a slow page loading. In order to minimize request for CSS files and JS files,I have some plugin recommendations for you:
I would highly recommend you use Better WordPress Minify . This plugin takes all your CSS and JS files and combine them in single files, reducing your HTTP request dramatically. Let’s say you have 10 CSS files and 10 JS files that are loading on your page. This means 20 HTTP requests. After installing Better WordPress Minify you will only have 2 requests, one for the CSS files combined, and one for JS. Now that’s 90% less requests, it can’t get better than this.
This is a must have plugin, and the only thing I regret is that I haven’t found it earlier. By default WordPress loads all the JS / CSS files / assets files of each plugin on every page and post from your blog. That’s a bad thing, because you may only need a specific plugin to load just on one page or post. Now what’s the point in loading the plugin files in other pages or blog posts as well, as this will result in tons of unwanted http requests?
Here’s where Plugin Organizer comes in handy. With this plugin you can nicely organize what plugins to load on a page, and disable the rest of them. Think of this, combined with Better WordPress Minify. Isn’t what a sweet thing? And beside that plugins always slow down your page, but now this isn’t going to happen anymore thanks to plugin organizer.
Also you can minimize HTTP requests by reducing the number of posts / custom posts types, images and other resources displayed on the page.
3.Use a cache plugin
When someone visits your website, WordPress generates content dynamically. This means database interrogations and php processing, resulting in high server overload, especially if you have many visitors. For this matter, you can use a caching plugin. What a cahing plugin does, it creates static pages and serve them to your visitors. Less php and database processing, high load speed of page!
There are many caching plugins available at wordpress repository, and you are welcome to try them all, but I am going to mention only the most important and recommended ones:
- W3 Total Cache – crafted with tons of options such as browser cache, object cache, database cache etc.I would highly recommend this especially if you are running an ecommerce wordpress website and you don’t want to cache your checkout and login pages.
- WP Super Cache – also with many many options to choose from and play with.
- Quick cache – perfect for beginner users
Big size images can also take time to load, especially if there are many of them. But luckily, you can compress them big time and have the same quality. You can use this tool , to compress JPG and PNG files directly online. You will notice very small image file sizes after compression, and your page speed will also increase.
Another thing to mention here, in CSS properties use sprite images for backgrounds, icons, etc. instead of creating multiple images. What you can do with sprite images, is take all of your images , combine them into a single image file, and access them via CSS background-position property. More details about this can be found here
5.Use a CDN service
When people access your website via your host, they are all pointed to the same data center, and nowhere else. But using a CDN service, which has data centers all around the world, your website will be served from the user’s most closer data center, resulting in a fast page loading. I like to use Cloudflare because they have a FREE plan which is enough to get you stared. Of course there are more companies that offer CDN, but I think Cloudflare and MaxCDN are the best.
In order to have a super fast loading speed for your website you will need to cover all of these aspects, and always be careful and not install any unwanted plugins, or add any unnecessary images or other assets that may slow your website. If you have any other ideas, please list them in the comments.