18 Tips on How to Speed Up WordPress

Prefetch Google Fonts:#
<span class="token tag"><span class="token punctuation"><</span>link <span class="token attr-name">rel</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>dns-prefetch<span class="token punctuation">"</span></span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>//fonts.googleapis.com<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
Prefetch Google Code (jQuery)#
<span class="token tag"><span class="token punctuation"><</span>link <span class="token attr-name">rel</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>dns-prefetch<span class="token punctuation">"</span></span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>//ajax.googleapis.com<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
Prefetch Google Analytics#
<span class="token tag"><span class="token punctuation"><</span>link <span class="token attr-name">rel</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>dns-prefetch<span class="token punctuation">"</span></span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>//www.google-analytics.com<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>

Host Google Analytics Locally

CAOS (Complete Analytics Optimization Suite) for Google Analytics allows you to host analytics.js/gtag.js/ga.js locally and keep it updated using WordPress’ built-in Cron-schedule. Fully automatic!

Whenever you run an analysis of your website on Google Pagespeed InsightsPingdom or GTMetrix, it’ll tell you to leverage browser cachewhen you’re using Google Analytics. Because Google has set the cache expiry time to 2 hours. This plugin will get you a higher score on Pagespeed and Pingdom and make your website load faster, because the user’s browser doesn’t have to make a roundtrip to download the file from Google’s external server.

Just install the plugin, enter your Tracking-ID and the plugin adds the necessary Tracking Code for Google Analytics to the header (or footer) of your theme, downloads and saves the analytics.js/ga.js/gtag.js-file to your website’s server and keeps it updated (automagically) using a scheduled script in wp_cron(). CAOS is a set and forget plugin.

Please keep in mind that, although I try to make the configuration of this plugin as easy as possible, the concept of locally hosting a file or optimizing Google Analytics for Pagespeed Insights or GT Metrix has proven to be confusing for some people. If you’re not sure of what your doing, please consult a SEO expert or Webdeveloper to help you with the configuration and optimization of your WordPress blog. Or feel free to contact me for a quote.

For more information: How to setup CAOS.

How to Move from Amazon S3 to DigitalOcean Spaces

If you have WP Offload Media set up with Amazon S3 and want to move your media to DigitalOcean Spaces, you’ll need to use our removal tool to remove all your offloaded media from your S3 bucket, then upload your media to your new Spaces bucket.

Update: We now have a more general guide for moving between different storage providers.

Important Considerations

But before you decide to make this move, you should consider the following questions…

Do I need to be using DigitalOcean Droplets to use Spaces?

Nope. You can use DigitalOcean Spaces no matter what server provider you’re with. We do use DigitalOcean Droplets ourselves though, and we do recommend them.

 

The Process

Now that you’ve read the FAQ above and you’re sure you want to move your media from Amazon S3 to DigitalOcean Spaces, follow the steps below.

1. Run the remove files tool

Remove all files from bucket button

Running this tool will remove all of your offloaded media from your Amazon S3 bucket. If the file doesn’t exist on your server, it will download it before deleting.

If you have a lot of media, it could take a long time for this to complete. Once the tool completes, you should find that all your media has been downloaded to your server and removed from S3.

If this step makes you a little nervous, you could do a little preflight check by running the “Download all files from bucket to server” tool then turning off the “Rewrite Media URLs” setting and making sure your site is working as expected. If everything checks out, run the remove tool.

2. Set Up DigitalOcean Spaces

Generate new key button in DigitalOcean Spaces

Now you’ll want to login to your DigitalOcean account (or sign up if you haven’t already), create the Spaces bucket you’ll use for your media, and generate access keys.

3. Configure WP Offload Media for DigitalOcean Spaces

WP Offload Media change provider link

Now you can click that provider Change link on the WP Offload Media settings screen, choose DigitalOcean Spaces, follow the instructions on how to set your access keys, and Save Changes.

You may get an error on the next page complaining about the bucket not being found. No biggie, just ignore that for a moment and click the bucket Change link, choose the Spaces bucket you created, and that should fix it.

4. Run the upload tool

WP Offload Media background offload in progress

Finally, run the upload tool and all your media will be uploaded to your new DigitalOcean Spaces bucket.

What is Redis Object Caching and How to Use It for Your WordPress Site

Redis and object caching can vastly speed up your WordPress page load times with each subsequent visit. It’s also used by many popular websites like GitHub, Pinterest, StackOverflow and many others.

Remote Dictionary Server (Redis) “is an open source, in-memory data structure store used as a database, cache, and message broker.” It’s a key-value store which is often called a NoSQL database.

It’s best used on dynamic websites such as WordPress sites when it comes to object caching, which caches repeating query results.

Today, I’ll share more detail on object caching, its benefits, and how to install and use Redis for object caching on WordPress websites.

 

More: kinsta.com

Plugin: redis-cache

GitHub WordPress Plugin: