There are many reasons why a WordPress website is slow and there are many ways to optimize your WP as we will cover in this article.
The first thing you want to do is check that you have a good and fast optimized for WordPress – Recommended web hosting. If your hosting company is slow, their servers are overloaded, or networks are not reliable, no matter what you do, you will not be able to get much speed from your optimization efforts.
How do you know if your host is slow or experiencing problems?
Check your website response time, from 7 location on them, using our own time to first byte checker, the tool will test your website if its up and running, from 4 different continents:
You will immediately know how your host is doing. If you see messages from all locations or the majority of locations reporting over 500 MS response time, then you have a problem and need to talk to your Web Host. What you want to see is good response time, for at least several places (<500ms), and most importantly the ones closer to where most of your clients are coming from. 500ms = “”, = “” and = “” most = “” importantly = “” the = “” ones = “” closer = “” to = “” your = “” clients = “” are = “” coming = “”>
If your TTFB response time is good but you think your WP total load time is not good then continue with the optimization process as explained below.
NOTE: We recommend that you check with a developer / freelancer if you are unable to optimize or maintain WordPress on your own. Some of the jargon used in this article may sound very technical, but some of the outlined steps can be performed even by a rookie web master.
First, check the total page size (content size) of your home page or other inside pages of your WP, which appears to be slow-make sure you are not using bulky images, large CSS files, large fonts, long Java scripts , or bad themes in general!
A good tool to use for this is called Pingdom (below). You can verify the total page size for each page you want to test:
NOTE: Always use the same location when performing your tests.
The fastest way to optimize your WP is to disable and delete any unnecessary plugins that can slow down your site without you knowing it!
You can test which plugin is slowing you down by de-activating them one by one and testing which will increase or decrease your loading time. More plugins you use, higher chance that your WP will not perform as expected. Sometimes it is very obvious and you can see it with the naked eye if a plugin slows you down when you enable / disable it.
If you have a lot of plugins, you can simply rename your plugins folder to disable all plugins on them, the plugins folder is under sub-folder: “wp-content” and called “plugins”, renaming it to something similar “plugins. Old “. Note that a bad plugin can also affect your TTFB time covered at the beginning of this article.
You can also use third-party plugins to help you discover what slows down your site, here are a few:
You can also control your entire WP CPU and memory usage with this plugin:
If you are using 3rd Party themes, we recommend testing your theme and it is performance by switching to another (standard lightweight WP theme) and comparing the loading time and performance of your site.
We’ve seen 3rd Party themes that slow down a website as bad as five times ! Do not use themes that are not tested or suspicious. Try reading reviews about the plugin you use to see if other people are not already experiencing problems with it. Note that a slow theme can also affect your TTFB time covered at the beginning of this article.
For experienced users only : Best practices when trying to optimize your own custom themes are:
- Files per page – reduce the amount of files to be displayed on your pages, combine multiple CSS files into a single file
- Inquiry Optimization – It is a good practice to hard code static values in your theme such as charset, site logo, menus, etc
Besides removing slow plugins and using lightweight themes, the second most important feature you need to enable for your WordPress is the use of a caching plugin! Frankly, any caching plugin, no matter which one, should give you a big boost if you are not currently using one.
These plugins will cache your dynamic pages / posts, reducing the time required for them to load. The most popular caching plugins are:
- WP Super Cache – This plugin is one of the best and highly recommended to be used if you experience performance issues. You should try using one of the 2 plugins listed here but not both at the same time.
- WP aggregate cache – This plugin contains many different features besides page caching. It includes the minification of your content, which will reduce the file size of HTML, CSS and JS scripts, dataBase caching, Object caching, CDN compatibility, etc. You can use this plugin with our Redis cache as outlined below. There are many more plugins out there, some paid some for free. In our own test we found that even the free versions of most paid plugins work fine.
Make sure you use the latest PHP version. Recommended is version of PHP 7. x, not 5. x. Contact your provider for more information. Make sure your PHP version supports acpu / opcache and ask your provider to enable these extensions for you.
High quality / bulky images are the major contributors to the web page size, degrading the page speed and stirring visitors waiting for the page to load. The following image optimization best practices go a long way in reducing the negative impact of images on the overall website speed:
- Format Selection: Use JPGs when quality is a high priority and image changes are not required before uploading. JPGs can take limited processing and modifications before image quality is sharply broken. For images with icons, logos, illustrations, signs and text, use PNG format. Use only GIFs for small or simple images, and avoid BMPs or TIFF files.
- Proper dimensioning: Save valuable bytes of image data and match the dimensions (width) of your web page template. Use the browser’s size matching to make images responsive by setting fixed width and auto-height instructions.
- Compression: Image compression should be a considerate balance between image size and quality. For JPGs, a 60-70 percent compression gives a good balance. For Retina displays, increase (JPG) image size by 150-200 percent, compress by 30-40 percent and scale it down again as per required dimensions.
- Fewer images: Keep the number of images to an absolute minimum.
Image optimization tools
- JPEG Reduce
- Jpegmini (app available for OSX, iOS, Windows)
WordPress image optimization plugins
- Optimization of CW image
- Lazy load
- WP Smush.it (Support ended)
- Radical Image Optimization Tool (RIOT)
- New line sign
- Block boundaries
This speeds up the loading times as it reduces the amount of code to be requested from the server.
There are many other plugins for WordPress designed to optimize your site. Some of them are:
- WP Smush.it – compress images without reducing their quality and dimensions
- WP DB Manager plugin for managing and optimizing your WordPress database.
- Better WordPress minify- specific tool that allows you to minify your CSS and JS files
Crawler protection (robots. Txt):
Crawlers or so-called Web spiders (robots) can cause significant strain on your WordPress installation and further slow down your site and put extra strain on your server. We have an article available on the subject, which we recommend that you review and implement ASAP.
Other useful optimizations:
- Optimize your database tables – You can do this either by using the WP DB Manager plugin or manually using tools such as phpMyAdmin.
- Check the size of the table “WP-Options” -Poor plugins, themes will increase the size of this table and slow you down. You can install a plugin like WP Clean up Optimizer for similar purposes.
- Disable the Post Revisions feature if you do not need it – Basically this feature is creating new row after each edit of your post. This can lead to unwanted size of your database and wp_post’s table. You can turn off this feature by adding queue to wp_config. php create in the installation directory: Define (‘WP_POST_REVISIONS’, False); If your site ran with this feature enabled, you can delete all unnecessary post revisions by running this query via phpMyAdmin (do this carefully and back up your database first): DELETE from wp_posts where post_type = “revision”;
- RSS pings and pingbacks – your site may be slowed by timeouts caused by your ping servers listed in your ping list, to disable this-navigate to your WordPress admin and then to settings-> writing