GeneratePress is one of the most highly optimized themes that are available for WordPress. But, there are some more things that we can do to optimize it even further. (I am using GeneratePress Premium in this case).
GeneratePress Default Installation Speed Test
The team at GeneratePress has created a demo site to check the speed of their theme at speedtest.generatepress.com. They have used Autoptimize to optimize their test site.
Here is the results of GTMetrix and Google Page Insights test:
Now, Let me show my site’s GTMetrix and Page Insights scores.
Ways to Optimize GeneratePress Theme
The first rule is to use as few plugins as possible because fewer plugins mean less code and less code means a faster website. Keeping that in mind, here are the things for which you should use code instead of a plugin:
- Notification bar
- Sticky sidebar
- Floating Whatsapp/Messenger buttons
- Social share buttons
- Social media follow buttons
- Author box
- …and more
I will be writing some tutorials regarding these topics.
Here are the settings which you should change in GeneratePress:
Most of the time, we use a PNG or a JPG image for the logo. For the best performance, one should use an SVG logo as SVG files are much smaller than PNG or JPG files and it has no loss in image quality. So it’s a win-win. Also, SVG files are highly scalable meaning no matter how big or small we make a svg image, the quality remains the same.
For security purposes, WordPress doesn’t allow SVG files to be uploaded. You can use any plugin to upload SVG files in WordPress.
Change the icon type to SVG instead of Font because as mentioned above, SVG has multiple advantages.
To do this, go to Appearance > Customize > General > Icon Type > Select SVG.
Also, if possible, avoid using FontAwesome or any type of external icons as they create additional requests which slows down a site.
Dynamic CSS Print Method
Make sure to generate dynamic CSS in an external file. This will further boost the performance od your site.
To do this, do to Appearance > Customize > General > Choose External File > Click Regenerate CSS File.
GeneratePress modules are only available in GP Premium. These modules add many extra functionalities to the theme. But, they also add extra network requests and also increase the page size. So, make sure u disable all of the modules that you don’t need.
To access GP Modules, go to Appearance > GeneratePress > Modules.
WordPress caching is extremely important for increasing your website speed. For more information about caching, you can take a look at this article: What is Website Cache.
In short, a website cache stores static data in a server for simultaneous visitors. How does this work? Well, taking the example of WordPress, we have the following data flow:
Visitor -> Server -> PHP -> Database (This is without caching)
Visitor -> Server (With caching)
As you can see above, caching eliminates 2 steps and hence reduces the load on the server.
There are two types of caching – server level caching and client level caching.
For this article, I will show you how to enable server-level caching using SG Optimizer.
Go to SG Optimizer > SuperCacher Settings > Enable Dynamic Caching and Memcached
In addition to that, you should enable every minification, font optimization, script deferring etc. settings. In SG Optimizer, go to Frontend Optimization and enable everything (make sure u test your site after enabling everything. If something seems broken, disable some of the settings and test).
Your hosting is one of the main contributor to your site speed. If you are okay with managing your own server then I would recommend to go with DigitalOcean. If you are not that much comfortable with server management but you need a good managed VPS, then I would recommend Cloudways.
I am using SiteGround for hosting my website and so far, it has been pretty good.
Some of the recommended hosting providers:
I would not recommend going with GoDaddy or any EIG owned hosts. I have listed all of the hosts owned by EIG below. AVOID them at all costs.
- A Small Orange
- Berry Information Systems L.L.C.
- Escalate Internet
- Host with Me Now
- Network Solutions
- Intuit Websites
- IX Web Hosting
- Networks Web Hosting
- SEO Hosting
- SEO Web Hosting
- Southeast Web
- SuperGreen Hosting
- Website Builder
- Webstrike Solutions
- Webzai – 2014
Social Sharing Buttons
External social sharing buttons can slow down your site by a lot. If you are using AddThis, then your site can slow down by as much as 1 sec! Also, plugin based sharing buttons don’t fare much better either.
The best solution is to code social sharing buttons manually. I will be writing a tutorial on this soon! Stay tuned!
Using an external font is a pretty bad idea. It adds extra requests, increases DNS lookups, and sometimes, the font server goes down. For these reasons, it’s always recommended to use local fonts. You can do this very easily in GeneratePress by changing the font settings.
Here is how you can change GP fonts to system fonts:
- Go to Appearance > Customize
- Go to Typography and choose System Stack from the font options
These are some of the tips for further improving the performance of GeneratePress theme (which is already a very fast theme).
If you have queries or suggestions, then please let me know in the comments down below.