How we made the MainWP site fast!

WordPress Optimization

Why is the hosting so import?

The MainWP site is hosted on Cloudways using Vultr for the infrastructure data center server. Without solid hosting, no matter the amount of site optimization is going to improve being hosted on subpar servers.

After hosting, where to start?

This is what the MainWP site was loading in GTMetrix results before the site was optimized for performance.

Here is what the MainWP site is loading in after the site was optimized.

MainWP before optimization

You can not improve the load time performance of the site without having a benchmark to work from. GTmetrix and WebPageTest are both solid options for synthetic performance testing. Besides the load time, the most important part to look in is the waterfall of the site. The waterfall will show all of the requests that are loaded on the site. These can be requests (CSS, JS, and Images) being loaded on the site server, as well as external requests being made on the site (e.g., Facebook or Google Fonts).

Slow requests, as well as many site requests, are going to slow the load time of your site down.

Swift Performance

Swift Performance

You can view the settings used in Swift Performance on the MainWP site in this gist.

If you view the raw settings used in the Gist, then you can import from the file in Swift Performance.

Swift Performance Settings

DNS prefetching

A DNS or domain name server converts IP addresses in readable website URLs such as yourwebsite.com. Whenever a user requests an asset being hosted on a particular domain, they must perform a DNS lookup and find which domain name that IP address belongs to. This process takes time, and the more DNS lookups that are required, the longer your visitors will be waiting for a page to load.

DNS prefetching allows the browser to perform the DNS lookups for links on a page in the background while the user browses the current page. This minimizes latency, as when the user clicks on a link with DNS prefetch enabled, they do not have to wait for the DNS lookup to take place as it already has.

https://www.chromium.org/developers/design-documents/dns-prefetching

www.google-analytics.com
cdn.iubenda.com
www.google.com
fonts.googleapis.com
www.gstatic.com
maxcdn.bootstrapcdn.com
js-agent.newrelic.com
hits-i.iubenda.com
bam.nr-data.net

WP Disable, Perfmatters and WP Rocket all have options for DNS prefetching. On the MainWP site, WP Disable was used.

DNS Prefetching

You can see the settings used in WP Disable on the MainWP site, using these settings. WP Disable has a function to be able to export and import settings.

Waterfall Analysis

Looking in the waterfall, a slow GET request was being made to admin-ajax.php, which took over 1.5 seconds to load. After digging into which plugin was causing the issue, the culprit plugin was Thirsty Affiliates. By looking through which plugin caused a very slow admin-ajax.php request on load, it was an automatic speed-up gain, by removing that slow request. The less the number of requests on load, the faster the site. The same principle applies to the current number of requests on load; make sure they are as fast as possible.

Thirsty Affiliates - Link fixer

Disabling Unused Images and Image Optimization

Disabling unused image sizes is an easy way to reduce the size of a sites media library from growing. There is an easy to use plugin at Stop Generating Image Sizes.

By disabling unused image sizes, when new media is uploaded on the site only specific image sizes are generated, but not all registered image sizes will be generated.

For the image optimization, we used the WP Compress plugin. WP Compress setting used was intelligent for images.

WP Compress

Going through the steps made in Swift Performance and WP Disable. Along with digging into any slow requests on load, that really stand out in the site waterfall. Resulted in improving the front-end load time of the MainWP site.

3 thoughts on “How we made the MainWP site fast!”

  1. Swift Performance works very well with WP Disable, in the case of the MainWP site, automatic DNS prefetching in Swift Performance was not activated and the DNS prefetching option in WP Disable was enabled with the sites then set.

    • I am glad you liked the post Collins. Taking the time to look through the site result waterfall is always the best place to start to find out what is really slowing the site load time down.

Comments are closed.

Looking for something?

Privacy laws apply to businesses that collect personal information. Since no personal information is collected by the MainWP plugins, no privacy laws apply to the MainWP plugins. This includes GDPR, UK DPA 2018, PIPEDA, Australia Privacy Act 1988, LGPD, PIPL, and other privacy laws.
Donata Stroink-Skillrud
Donata Stroink-Skillrud
President of Agency Attorneys

Your Download Is Just One Click Away

…or just download the plugin.

By entering your email, you agree to our Terms of Service and Privacy Policy.