Follow

Slow WordPress Site

 

This will help you on how to debug WordPress Performance.

 

You can use these two sites to see how fast your site is running:

GTMetrix

https://gtmetrix.com/

WebPageTest

https://www.webpagetest.org/

First Byte Time - This is Time Before First Byte, so this is the time that it takes the server to respond.

Keep-alive Enabled - KeepAlive will reduce the latency with HTTP transfers to the same server and will reduce connections needed to the server.

Compress Transfer - Gzip can be easily enabled for a site, it will compress files that are being transferred, which makes them faster.

Cache static content - Which is browser caching, using mod_expires or similar.

Effective use of CDN - If a CDN is being used for a site. If Photon is being used it will not show, since Photon is a reverse proxy and a CDN.

 

Static Page Caching:

So a simple way to enable page caching on a site is to use this plugin.

Endurance Page Cache

https://github.com/bluehost/endurance-page-cache

It will create a HTML version of every page and post on a customer’s site.

So that the HTML version is served when someone visits that site. It means a site will be a load faster because WordPress and PHP is never loaded.

 

Browser Caching:

An easy way to enable browser caching on a site is to use this plugin. Endurance Page Cache

https://github.com/bluehost/endurance-browser-cache

So the plugin will write in the browser caching rules, for the different file extension types into the sites .htaccess file.

So the next time a users visits the site, the most common files on the site, will be served from their browser cache and will not have to request those files from the hosting server.

 

Make sure that PHP7 is being used on a site, this will improve performance on how fast PHP can be processed over using an older version like PHP 5.5 or 5.6.

 

Easy site fixes to reduce HTTP requests:

To disable the emoji in WP core from loading on a site, you can fix wp-emoji-release.min.js from loading on the front-end using this simple plugin.

Disable Emoji

https://wordpress.org/plugins/disable-emojis/

 

How to optimize a site DataBase with a plugin:

It is easy for a WordPress site database to become bloated with a number of post revisions, expired transients and orphaned postmeta.

WP-Optimize

https://wordpress.org/plugins/wp-optimize/

Very easy plugin to do, will give options to delete post revisions, expired transients and orphaned postmeta.

This will reduce the size of the DB making queries faster.

 

How to speed up the WP Admin on a site?

Restrict the Heartbeat API from making calls.

There is a plugin that you can define this in.

Heartbeat Control

https://wordpress.org/plugins/heartbeat-control/

Settings > Heartbeat Control

 

What if a site is causing slow queries?

The two best plugins to find what resources are being used on a site and if a plugin on a site is causing slow queries in the site database.

Debug Bar

https://wordpress.org/plugins/debug-bar/

Query Monitor

https://wordpress.org/plugins/query-monitor/

 

How to minify CSS and JS files:

So the easy way to reduce the number of HTTP requests on load, is to minify CSS and JS files of the active theme.

There are a couple of plugins that do this. Autoptimize

https://wordpress.org/plugins/autoptimize/

WP Minify Fix

https://wordpress.org/plugins/wp-minify-fix/

Another simple fix to remove the query string, which can improve site caching.

So this can be fixed with a simple code snippet or you can use a plugin like.

Query Strings Remover

https://wordpress.org/plugins/query-strings-remover/

 

Disabling Gravatars:

So if the site does not have comments enabled and does need to pull display Gravatars, then you can just disable them.

This will prevent the Gravatar HTTP calls on site load from happening.

Settings > Discussions > Show Avatars un-check

If you did still need to display an image for Avatars, but not have the call to Gravatar.

You can use this plugin.

WP User Avatar

https://wordpress.org/plugins/wp-user-avatar/

 

Lazy loading images, video and comments:

So you can enable lazy loading for images very simply with any of these plugins.

Lazy loading does cause issues in images used in Slider Revolution images, so something to be aware of.

Images

 

Disabling pingbacks and trackbacks:

Trackbacks and pingback are considered a legacy feature, which can cause performance issues.

You can use Ahref or Google Alerts to see who is linking to your content.

So to disable go to Settings > Discussion and then clicking on Allow people to post comments and new articles. 

 

Purging Caches:

The page cache can be cleared in the Must-Use plugins, then Purge Cache.
The purge cache button will purge both the page cache and the NGNIX+/Varnish cache. Browser caching can be cleared from the links on this site. http://www.refreshyourcache.com/en/home/

If a customer is using a CDN for their site, then the CDN will have an option on that specific site to be able to easily purge the CDN cache.

 

 

 

 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments