Why is my WordPress Slow and How to Fix Slow WordPress

June 24, 2020 | Hosting , Speed optimization , WordPress | by Mihovil Mikulec
Why is my WordPress Slow and How to Fix Slow WordPress

In this ultimate 2020 guide we will go through all the possible reasons why your WordPress is slow and how to fix that! After we are done, your WordPress loading speed will becomes much better and your website will rank better!

Why your WordPress website should never be slow

For the start, users may leave your website before it even opens! According to Google, 40% of people abandon a website that takes more than 3 seconds to load.

That is why Google prefers to position faster websites higher on the search results pages.

In other words, slow WordPress will make you lose potential visitors and clients, possibly even the existing ones.

If you are not sure how long exactly does it take for your website to open, use this tool to find out.

5 reasons why your WordPress may be slow

The common reasons why WordPress websites are slow:

  1. Poor development practices and decisions
  2. Bad or outdated hosting environment
  3. Large and unoptimized images
  4. Plugin overuse
  5. Hacked website

12 ways to fix your slow WordPress website

1. Don’t use cheap hosting

This should really be obvious but it is not for most people so it must be mentioned. Fast, stable and secure hosting environment for your WordPress website is the starting point of your fast WordPress journey.

Web hosting is not just placing a website on the server and forgetting about it. It also includes hardware and software updates, performance monitoring, proper security and user support.

Most of the hosting companies are not focused on a specific niche (e.g. WordPress hosting). Not only that, they also offer shared hosting services so potentially there are hundreds of websites and apps on a single server.

This can be a real issue because hosting companies can’t always update their server software right away when there is a new security or peformance update available. If they do update it right away, they are risking broken or bugged websites, due to their variety.

While the hosting company is delaying software updates, your WordPress website may not perform at its peak or even worse, it may be vulnerable to hack attacks for a longer periods of time. Perfect example of this is PHP 5 to 7 transition.

Quality WordPress Hosting solutions

Here are some points to consider if you would like to switch to a better hosting.

  1. Focus on finding hosting services which are NOT cheap. 15$ per month for hosting a single WordPress site would be OK starting point. Don’t even consider anything lower than that.
  2. Only consider hosting companies which are focused on WordPress hosting. If the company is offering standard hosting and WordPress hosting as 2 separate services, in most cases they are only trying to jump on the WordPress hosting bandwagon, while not really providing anything specifically related to WordPress.
  3. Consider using professional WordPress care services. Essentially, this will solve your hosting issues as well as WordPress speed optimizations, WordPress security segment and all the other annoyances you might have with your WordPress website. You can sign up for one of our WordPress care plans and focus on your business while we do the rest. πŸ™‚

2. Use SSD for data storage

SSD stands for “solid-state drive”. It is a storage device, alternative to HDD (hard disk drive). Unlike HDD, which relies on moving parts and magnetism to store data, SSD uses flash memory (just like USB flash drive does).

Thanks to that, SSD handles all the data transitions a lot faster than any HDD ever could. This goes for both data storing and data accessing. Therefore, if your host uses SSD for data storage, your website will store and fetch data to/from the database much faster.

How to use SSD on your host

  1. For the start, check your hosting package details to see if it includes SSD support. If it does, you are all set, if it does not, contact your hosting support and ask them if they provide any packages which include SSD. If they do, request a package change.
  2. In case your hosting can’t provide you with SSD, you really should consider a new hosting provider. You can check out our WordPress hosting & care plans, they all include SSD support.

3. Use PHP7

As it often goes with software, newer versions get better optimizations and new features. PHP7 is no different and it introduces a lot of changes which make it a huge improvement over previous PHP version, which was PHP5.

Some of PHP7 features are reduced memory usage, better error handling, smaller data structures, improved security and so on. Online benchmarks of PHP7 vary a lot depending on website type and development details, but all of the results are saying that it is by far the fastest PHP version yet.

WordPress installations on PHP7 are in most cases running 20-50% faster when compared to those powered by PHP5.

How to use PHP7 on your host

  1. Log in into your hosting’s panel and go to PHP section. There you should be able to see which PHP versions are available for you to use and which one you are currently using. Make sure you always use the latest available PHP version (currently that is PHP 7.4).
  2. If your hosting can’t provide you with PHP7 support, you really should consider a new hosting provider. You can check out our WordPress hosting & care plans, they all include the latest available PHP version – now and in the future.

4. Use “Cloudflare”

Cloudflare provides CDN (content delivery network), DDoS mitigation, website firewall and much more. It acts as a proxy between the site visitor and the hosting provider. And the best part is, it is free (unless you need premium packages).

Overall, Cloudflare is an easy way to improve your website speed and security, for free.

How to use Cloudflare on your WordPress

  1. Visit Cloudflare website and create a free account. Add your WordPress domain to Cloudflare. Cloudflare will store your current DNS configuration and provide you with new nameservers. Replace your old nameservers with new ones provided by Cloudflare and you are all set.
  2. If you don’t feel comfortable setting up Cloudflare account by yourself, we can do it for you. Cloudflare setup is included in all of our WordPress care packages.

5. Use HTTP/2 protocol

HTTP stands for “hypertext transfer protocol”. It is used for data communication and it is the foundation of the internet we know today.

Some of the improvements HTTP/2 introduced are:

  • Usage of binary protocol for data transmissions. This allows for better data compression and with it, faster transmissions. HTTP/1 uses plain text.
  • Availability of multiple simultaneous downloads over a single TCP connection.
  • Elimination of redundant headers and compression of the remaining headers to decrease the amount of data transferred during a session.

So, what is the main difference? HTTP/2 changes the way data is formatted and transported between clients and servers, which makes a huge difference when it comes to website loading speed.

How to use HTTP/2 protocol on your host

  1. You can use this tool to determine if your website already uses HTTP/2 protocol. Simply enter your full domain into the field and press “test”. You should get a message saying “HTTP/2 protocol is supported”. If that is the case, congratulations, your website already uses HTTP/2. πŸ™‚
  2. In case you get a message saying that the protocol is not supported, you can contact your hosting provider and ask if they can enable it. If they can’t, don’t worry! You can always create a free Cloudflare account, add your domain there and get the benefits of HTTP/2 protocol, while not changing hosts at all.
  3. If your hosting can’t provide you with HTTP/2 support and you don’t want any extra hustle, check out our WordPress hosting & care plans, they all include HTTP/2 support at host level and free Cloudflare implementation.

6. Use CDN (content delivery network)

CDN stands for “content delivery network”. It is a world-wide network of servers which are storing and providing websites with static resources (such as images, JS and CSS scripts), for maximum loading efficiency.

There are many CDN services out there but I personally would suggest Cloudflare CDN. It is free and requires no extra setup once you create your free Cloudflare account and connect your domain.

7. Use script minify

This feature will minify HTML and JS / CSS scripts your website is using and increase the loading speed of your pages.

The fastest way of accomplishing this is by using a plugin such as JCH Optimize. This plugin can minify your scripts and HTML but it also comes with extra features such as website cache and script combiner to reduce HTTP requests used by scripts.

If you decide to use Cloudflare, it will minify your scripts at the host level. That way your WordPress won’t need script minify (or cache) plugin. All you need to do is to create a free Cloudflare account, connect your domain, go to Speed / Optimization in your CF dashboard and enable auto minify.

Cloudflare offers an optional rocket loader feature. Rocket Loader prioritizes your website’s content (text, images, fonts etc.) by deferring the loading of all of your JavaScript until after rendering. On pages with JavaScript, this results in a much faster loading experience for your site users. If you enable this option, make sure you test your website afterwards, since sometimes this option may break your scripts!

Also, make sure that you don’t use inline CSS because it can make your WordPress slow. Always load CSS code inside CSS scripts.

8. Use website cache

Website cache is a temporary storage of website assets such as images and scripts. It speeds up website loading for repeating visitors.

Common way to enable cache on your WordPress website is via cache plugins, such as W3 Total Cache or WP Super Cache.

Cloudflare also provides website cache – at the host level. Just like in the script minify scenario, your WordPress won’t need cache plugin if you choose to go with Cloudflare.

9. Optimize your WordPress images

Large and unoptimized WordPress images can make huge issues when it comes to site opening speed. For the start, make sure you don’t use way too many images on a single page or post. This way you will reduce the number of HTTP image requests and reduce the overall weight of images per page or post.

Additionally, make sure you resize your images. Do you really need HD images on your website?

The last thing to do is to make sure you optimize your images or in other words, compress them. That way, you will additionally reduce every image in weight. You can accomplish this with plugins such as ShortPixel or Smush.

10. Reduce the number of active plugins

Most of the WordPress plugins load their own CSS and JS scripts. The more scripts your website loads, the longer it takes for it to open.

People are often using plugins which provide functionality that can easily be included into theme files or via theme settings. Or even worse, they use 3 different plugins because they don’t know that one of them can provide the solution for all 3.

Things like website cache and script minify can be solved without plugins, on DNS/host level (with Cloudflare).

You really need to be smart about your plugins. If you are not using them, delete them. If you are using them occasionally, deactivate them until you actually need them. And if you figure out that one of your plugins can complement the features of another plugin, use only that one.

11. Make sure your website is not hacked

Websites get hacked for many reasons and that is why side effects on your site may differ.

In some cases your website will be defaced (visually destroyed) and you will know right away what is going on.

However, in most cases, hackers won’t touch your site visuals but instead, they will upload malicious scripts and “camouflage” them to look as a part of your website.

That way, they can use your site to mine cryptocurrency or to perform different types of attacks on another sites, such as “DDoS”, “brute-force” etc.

Obviously, malicious activity such as that may lower your WordPress performance and make it slow.

Luckily, there is an easy way to check if your WordPress is hacked. It might not be perfect but it works in most cases. Open Sucuri SiteCheck, enter your website URL and press “scan website”.

Results of this scan will show you not only if your website is hacked but also how vulnerable it is, even if it is not currently hacked.

Regardless of your test results, we can help you clean your WordPress from malware and even improve its overall security. Both malware cleanup and security improvements are included in all ouf our monthly hosting & care packages.

12. Load your scripts only on pages where they are needed

Good example of this is commonly used “Contact Form 7” plugin. It loads its own scripts (CSS and JS) on every page of your website. Even on pages where you don’t need contact form. However, there is a cool trick you can use so that CF7 loads its scripts only on pages where you need them.

In general, it is a great practice to inspect your WordPress code and see what scripts are being loaded. That way you can do some research and find different methods on how to prevent scripts you don’t need from loading (or at least load them conditionally).

Conslusion

Hopefully, this article was helpful to you! In case you have any extra questions, feel free lo leave us a comment below and we’ll answer as soon as possible. You can also share your opinion on this article with us. What methods from our list will you use?

Good luck with fixing your slow WordPress! πŸ™‚

Need someone to take care of your WordPress website?

The easiest way to describe WordPress care services is to say that they bring peace of mind to WordPress site owners and save their time. But not only that, proper WordPress maintenance and monitoring can prevent a lot of potential problems on your website and make it perform faster and better, helping you attract and convert new clients.

  • Speed
  • Security
  • WP updates
  • Daily backups
  • Hosting
  • Uptime monitoring
  • Spam protection
  • SSL certificates
  • Malware removal
  • Form testing
  • SEO blacklist checkup
  • Database optimization
  • Activity monitoring
  • Technical support
  • Free migrations
Mihovil Mikulec
Mihovil Mikulec
Thank you for reading! I am owner of Soulstudio, WordPress developer with 10 years of experience behind me. My primary focus is on WordPress hosting, security and performance. You can contact me directly at [email protected]

Leave a Reply

Your email address will not be published. Required fields are marked *

Soulstudio


Who we are

What started in 2010 as a one-man web development operation is now a small and devoted team of web developers and server administrators.

Our focus is on WordPress hosting and WordPress care services such as speed optimizations, bug fixing and security hardening.

We are located in Croatia (Europe).

Our mission

Our mission is to provide fast, stable and secure hosting environment for your WordPress websites, as well as professional WordPress care services and ongoing user support.

We believe that everybody deserves safe, stable and affordable hosting services. That is why our dedication, commitment and constant learning are reflecting that philosophy.