Recommended Swift Performance Settings to Speed Up Your Website – WordPress Cache Plugin (2019 Guide)

This is the definitive guide about the Swift Performance cache plugin.

If you wonder:

What is the perfect settings for Swift Performance?

How Swift Performance can speed up your websites?

This guide will walk you through the entire functions and settings of Swift Performance.

Let’s dive right into it now.

Why Choose Swift Performance?

You probably also heard of other famous cache plugins like WPRocket and W3 Total Cache.

But why choose Swift Performance?

Swift Performance is a new cache plugin. It is a powerful cache plugin no matter in Lite(free) or Pro(paid) versions. It gains a lot of traction and becomes one of the top choices from the users for both Lite and Pro versions. (See my images below)

swift performance vote
swift performance lite vote

Swift Performance gives most of its core features like caching and merging tools for free in Lite version, where other plugins can’t.

With Pro version, it has advanced features like compute API, server push, unlimited image optimization, critical fonts, and other great features where other cache plugins don’t have.

It consists of the complete tools for website speed optimization.

Most importantly, the speed test result produced is great. Look at my GTMetrix report below. It gives me 387ms fully loaded time (my web hosting contributes to this performance too).

swift performance speed test report

In this guide, I’m using the Pro version to walk through the entire guide, you may have to skip certain feature if you are using a Lite version. But no worry, Swift Performance Lite is already enough to give you great speed performance.

(By the way, this is just the sub-part of my complete website speed optimization guide by using Swift Performance cache plugin on the website.)

Swift Performance WordPress Cache Plugin
Recommended Swift Performance Settings to Speed Up Your Website
Swift Performance is the all in one cache plugin to speed up WordPress site. (The definitive guide)

1. AutoConfig (Let’s do AutoConfig for once):

When you first install the plugin, you will be prompted to configure the settings. Else, you can go to Dashboard -> Setup Wizard to run it as well.

Just follow the steps below to do your auto-configuration. Click Next until it is finished.

Auto Config

That’s it.

You are done with the auto-configuration by Swift Performance, but there is a lot more improvement that can be done.

2. Dashboard Tab:

This is the dashboard of the Swift Performance. It shows the number of pages found and cached by Swift Performance with the cache size and the number of threads used during pre-building.

It shows up the pages found in the warm-up table. You can set each URL caching priority (the lower the value, the higher the priority to be cached first), add and remove the cached page

dashboard

3. Settings Tab:

It consists of the core settings of Swift Performance for instance: Caching and Scripts/CSS Optimization.

3.1. General:

General -> General:

  • Disable Cookies – OFF. I didn’t turn on this because I’m using Google Analytic on my website. I must keep the cookies of my Google Analytic always on to track the correct statistic. Turn it on if you have GDPR and ask cookies permission from visitors.
  • Hide Footprint (Pro) – OFF. This is used to disable Swift Performance comments at the footprint of our HTML code as shown in the image below. If you are using CloudFlare, the comment will be removed even if you didn’t turn on it.
  • Use compute API (Pro) – ON. This will increase the merging process for scripts and styles as well as reduce CPU usage.
  • Enable remote cron (Pro) – OFF. I didn’t use it because I don’t have schedule tasks. If all your pages are cached and you have scheduled tasks for example scheduled post and scheduled backup, you can enable it.
  • Beta Tester – OFF. Don’t use for a production website.
  • Debug Log – OFF. Can turn on it to see the debug logs when you are running diagnosis.
general general

General -> Tweaks:

  • Normalize Static Resources – ON. This feature will remove query strings such as “&” and “?” from static resources like CSS, JS and IMAGES files. Sometime you may get suggestion such as from GTMetrix to remove query string from static resources. By keeping the query strings, it may cause caching issues. So I turn it ON.
  • Prefetch DNS – ON. It can decrease full load time, and also speed up outgoing links. Prefetching allows a browser to silently fetch the necessary resources needed to display content that a user might access in the near future.
  • Collect domains from scriptsON. By enabling this, Swift Performance will collect 3rd party domain names from javascript files as well else only from HTML and CSS. This is helpful for prefetch DNS above.
  • Exclude DNS Prefetch – Leave EMPTY. Fill in the domain name which you don’t want to prefetch DNS.
  • Gravatar Cache – OFF. Gravatar is an image beside your name when you comment on a blog. By turning ON this cache, it will speed up the Gravatar loading but this useful if you have a lot of comments in your blog. For a small website with fewer comments, you can ignore it because it only loads at the end of the post.
  • Custom Htaccess. This will add rules to the very beginning of .htaccess. If you are writing rules directly in a .htaccess file, for instance, force SSL and www to non-www rules. Please remove them and insert them here. Please also avoid using SSL plugin. Below is the example of rewrite rules to force HTTP to HTTPS and www to non-www.
 # BEGIN Redirects
RewriteEngine On
# 301 redirect www to non-www
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
# 301 redirect to https
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# END Redirects
  • Background Requests (Pro). For some AJAX requests which don’t need the response (eg post view stats). You can add rules to make this requests run in background, so the browser won’t wait the response. I didn’t use it.
General Tweak

General -> Heartbeat:

Heartbeat tracks user sessions in admin and auto-saves your content. If you keep your WordPress admin up for long periods of time, especially when writing or editing a post, it can cause high resource usage.

To prevent this, you can increase the heartbeat interval time or even disable it to save your server resource usage. Some suggest disabling all except Posts / Pages.

general heartbeat

General -> Google Analytics:

  • Bypass Google Analytics – ON. If you are using google analytics, bypassing Google Analytics can fix items such as leverage browser caching in GTmetrix/Pingdom related to Google Analytics.
  • Tracking Code.  Get your tracking code from Google Analytics
  • IP Source. Use the recommended option
  • Anonymize IP – OFF
  • Delay Collect – ON. Speed up initial loading time.
  • Exclude Users from Statistics (Pro). I exclude all except Subscribers
General Google analytics

General -> Whitelabel:

  • Whitelabel (Pro) – NO. Whitelabel provides option to re-brand the Swift plugin. This is useful for people who want to hide their speed-up secrets. 😉

3.2. Media:

Media – > Images:

  • Optimize Images on Upload (Pro) – ON.  Swift Performance will automatically optimize the images during the upload using their Image Optimization API.
  • Image Optimizer (Pro) – Lossless. I keep the quality as lossless and 100% for both PNG and JPG quality.
  • Resize Large Images (Pro) – ON. Limit the maximum width of an image in px. Resize the image when larger than the limit. Please resize your image to the exact size you want before uploading.
  • Maximum Image Width (Pro). Specify the maximum width in px. I set 1400px.
  • Keep Original Images (Pro) – ON.  By turning on this, you can keep and restore original images.
  • Inline Small ImagesON. It will inline any images smaller than the size you specify (My case 10000 bytes). It will reduce the number of HTTP requests and improve load time.
  • Lazyload Images – OFF. Lazy load image can increase page load time but it will definitely spoil the user experience. If turn on, low quality (blurred) of images will be loaded initially, and will only fully be loaded when users scroll until it.
  • Force Responsive Images – OFF. Most themes already have responsive images. Turn it on if your theme/plugin incorrectly loads large images on mobile. Just leave it OFF if you are using a reliable theme.
  • Lazyload Background Images – OFF. This is the same as above Lazyload images but applicable for background images. Turn it OFF as it will spoil the user experience.
Media Images

Media -> Embeds:

  • Youtube Smart Embed – OFF. If you have youtube embedded in your website, turn it ON.
  • Lazy Load Iframes – OFF. Only turn it ON if you have iframe such as video, google map embedded not at the top of the page. To greatly reduce page load time.
  • Exclude Iframes. Exclude any Iframes from lazyload.
  • Load Iframes on User Interaction – ON. Turn it on if you want to load iframes after interact with it (mouse move or scroll)  
media embed

3.3. Optimization:

Optimization -> General:

  • Merge Assets for Logged in Users – OFF. It will potentially break some styles and function at logged in areas, it brings more troubles so turn OFF it.
  • Enable Server Push (Pro) – OFF. One of the great features from HTTP/2 is the server push, it allows the web server to send resources to the browser before it is asked. Please check if your site is working better after you enable this, some websites might not support it. However, this does not improve my website performance
  • Optimize Prebuild Only – OFF. This will optimize the page when the prebuild cache process is running. Not really useful.
  • Optimize in Background – OFF. Swift performance will optimize pages in the background.
  • Fix Invalid HTML – OFF. Because I only use those reliable themes and plugins, it shouldn’t have invalid HTML.
  • Minify HTML – ON. Turn it ON to reduce the HTML file size. Please make sure you don’t do minification in other places such as Cloudflare.
  • Disable Emojis – ON. Most sites are not using emojis at all, but WordPress is still loading it by default.  Turn if ON if you don’t use emojis in your contents.
  • Limit Simultaneous Threads – ON. Turn it on if you are using shared hosting. This will limit the number of concurrent connection to reduce server resource usage. This will prevent your site from 508 error (resource limit is reached). Can turn off if you having your own server.
  • Maximum Threads – 2. 2 is suggested for shared hosting website.
  • DOM Parser Max Buffer. Just leave it and use the default value.
optimization general new

Optimization -> Scripts:

  • Merge Scripts – ON. The number of HTTP requests will be greatly reduced when you turn ON this. It will speed up the page loading even if your server is using HTTP2, and also save resources from server side (because the server needs to serve fewer requests). Many people say turn off this because it may bring conflicts to the website and it is even worst for page builder such as Elementor website. However, it can be solved by excluding certain scripts from merging to ensure it runs without a problem. My site has left only 7 requests and is still working great.
  • Async Execute – ON. By async execution, the scripts(s) will not be loaded one followed by one, it may break the website. However, if the website has no problem after turn on this, it can dramatically reduce loading time. Test it carefully especially for a page builder website.
  • Exclude 3rd Party Scripts – OFF. If you had experienced website problem after turning on the Async Execute, you may try to turn on this see if this can solve the problem.
  • Exclude Scripts. You can look for the problematic scripts and exclude them. This step is probably needed especially for page builder such as Elementor website.
  • Footer Scripts (Pro). This will prevent scripts from merging and move the scripts to the footer.
  • Exclude Inline Scripts. Exclude the inline scripts from being merged.
  • Footer Inline Scripts (Pro). Exclude the inline script from being merged and move them to the footer.
  • Exclude Script Localizations – ON. This is recommended to turn ON by Swift Performance team, else you will have separate scripts files for different pages.
  • Minify Javascripts – ON. Reduce the javascript files size. Turn it ON and turn OFF at other places. (Enable only one)
  • Minify with API – OFF. Turn ON this if minify javascript causing error.
  • Proxy 3rd Party Assets – OFF. Turn OFF this because it may cause problems.
  • Separate Scripts – ON. Turn ON this if you are using a page builder like Elementor.
  • Print merged scripts inline – OFF. This will defer scripts to load at the footer. So keep this turn OFF when Javascript is needed for initial page items or you need faster prebuild. 
  • Print merged scripts inline – OFF. This will defer scripts to load at the footer. So keep this turn OFF when Javascript is needed for initial page items or you need faster prebuild. 
  • Lazy Load Scripts – OFF. Use this feature to define what elements can be lazy loaded and when they become visible in the user’s viewport. This works nice, especially for ads or forms.
  • Include Scripts. I didn’t use this, it will preload script files.
  • Disable jQuery Migrate – ON.  Turn on this when you are using updated theme/plugins. jQuery Migrate script is to support old JS code.
optimization javascript

Optimization -> Styles:

  • Merge Styles – ON. Just like with merge script, this merges CSS files. Have to test it carefully especially using a page builder to build a website. Can exclude certain CSS files from merging to solve the conflicts.
  • Generate Critical CSS – OFF. This does not increase my page load time so I turn OFF this.
  • Print full CSS inline – OFF. I don’t recommend it unless your page is super lightweight.
  • Separate Styles – ON. Same as separate scripts, this should be turned on especially for the website using page builder.
  • Minify CSS – FULL. Choose “FULL” to have full minification for style files. (Only enable at one place)
  • Bypass CSS Import – ON. Swift recommends to turn on this, it merges the imported CSS files as well.
  • Exclude 3rd Party CSS – OFF. try this if you have CSS problems.
  • Exclude Styles. If you have a problem with the website style, you can look for the problematic CSS and exclude them.
  • Exclude Inline Styles. Exclude inline styles from being merged.
  • Include Styles. I didn’t use this, it will preload  CSS files.
optimization styles

3.4. Caching:

Caching -> General:

  • Enable Caching – ON. You must turn on this to enable caching.
  • Caching Mode – Disk Cache with Rewrites. Disk Cache with Rewrites is the fastest, If you can’t edit the .htaccess file or the Nginx config so select Disk cache with PHP instead. If memcached is installed you can select Memcached with PHP instead of Disk cache with PHP, but again, if available, you should choose the rewrites option.
  • Early Loader – ON. Turn ON this.
  • Cache Path. Check this directory if caching or prebuild doesn’t work.
  • Cache Expiry Mode. Swift recommended to use Action based mode. Swift will clear the cache if the content was modified such as post update, new post, new comment.
  • Clear Cache on Update Post by Page. I didn’t use this.
  • Clear Cache on Update Post by URL. I didn’t use this. which auto-clears after any changes. Folks using Time Based Mode may want to clear any page that shows dynamic content. (For example, clearing home page or blog category pages so they show the latest posts.)
  • Enable Caching for logged in users – OFF. This feature works great if you have many logged-in users.
  • Separate Mobile Device Cache – OFF. Turn OFF this if you do not use the AMP.
  • Enable Browser Cache – ON.  Must turn ON this.
  • Enable Gzip – ON. Must turn ON this also.
  • Send 304 Header – OFF.
  • Cache 404 pages – OFF.
  • Enable Dynamic Caching – OFF. This the advanced feature from Swift, you can use it if you are experienced developer.
  • Cacheable AJAX Actions – Just leave it blank unless you know how to configure it.
  • AJAX Cache Expiry Time – Default value. leave default value
Caching General

Caching -> Tweaks (Pro):

  • Enable Proxy Cache – ON. Turn ON this if you are using CDN.
  • Proxy Cache Maxage – 30879000. 1-year cache.
  • Ignore Query String – OFF. Turn off this as query string is important as well.
  • Avoid Mixed Content – OFF.
  • Keep Original Headers – ON. Just leave it ON.
  • Case Insentive URLs – OFF. Convert all URLs to lower case for caching. Not really useful
  • Lazyload elements – OFF. I didn’t use it.
caching tweak

Caching > Exceptions:

  • Exclude Post Types. Select posts which you don’t want to cache.
  • Exclude Pages. Select pages which you don’t want to cache.
  • Exclude URLs. Exclude certain URLs from caching when the string is matched with the URL.
  • Exclude Content Parts. Exclude certain pages when it consists of the string.
  • Exclude User Agents. Exclude certain users from caching when the string is matched.
  • Exclude Crawlers. Exclude certain search engines from crawling the cached page, they will always see the latest content, but it increases the server’s load.
  • Exclude Author Pages – ON. Exclude author page from caching. I turn ON this one because it is less visited page.
  • Exclude Archive – ON. Just leave it OFF to make sure Swift caches archive pages, but I leave it ON because I don’t have archive pages.
  • Exclude REST URLsON. You don’t need these items to be pre-cached.
  • Exclude Feed – ON. You don’t need these items to be pre-cached.
Caching exception

Caching > Warmup:

  • Enable Remote Prebuild Cache – OFF. Swift recommends to turn off this, your server can’t visit itself and can’t prebuild cache.
  • Prebuild Cache Automatically – ON. Just turn ON it to let Swift to automatically prebuild the cache after it has been cleared.
  • Prebuild Speed. You can specify the prebuild speed. I put unlimited for my case.
  • Discover New Pages (Pro) – OFF. Don’t let Swift to automatically search for new pages unless you find out Swift can’t determine all your pages.
  • Prebuild Author Pages – OFF. Turn OFF this if you enable exception above.
  • Prebuild Archive – OFF. Turn OFF this if you enable exception above.
  • Prebuild Terms – OFF. Turn ON this if your users often click on your term pages. For me, OFF.
  • Prebuild REST URLs – OFF. Turn OFF this if you enable exception above.
  • Prebuild Feed – OFF. Turn OFF this if you enable exception above.
Caching warmup

Caching > Varnish:

  • Enable Auto Purge – OFF. Turn ON this if you are using Varnish cache. It will purge Varnish cache as well after doing clear cache.
  • Custom Host – EMPTY. You may enter the Varnish server here, if you are using proxy (eg: Cloudflare)

Caching > Appcache:

  • Enable Appcache for Desktop – OFF. Not recommended to use.
  • Enable Appcache for Mobile – OFF. Not recommended to use.
Caching appcache

3.5. CDN:

CDN->General:

  • Enable CDN – ON. Enable this feature if you have a CDN. To minimize the distance between the visitors and your website’s server, a CDN stores a cached version of its content in multiple geographical locations. ( This CDN doesn’t mean for Cloudflare). CDN such as BunnyCDN can make your website load faster, improve your ySlow Score by solving the “use cookie-free domains” limitation. BunnyCDN is a low cost and with great performance CDN. It charges based on usage you used by month.
  • CDN Hostname – Your CDN Hostname.
  • CDN Hostname for Javascript – Specify another hostname for javascript if you have another CDN else it will follow the original CDN hostname.
  • Enable CDN on SSL – ON. For https
  • SSL CDN Hostname – Your CDN Hostname. Same as above.
  • SSL CDN Hostname – Same as above.
  • CDN Custom File Type – File extension. Some file types by default they will not be cached, you have to specify the file types here. Check whether your file is cached in your CDN by checking from GTMetrix’s Waterfall.
swift cdn

CDN->Cloudflare:

  • Enable Auto Purge. It can automatically purge the Cloudflare cache when you have cleared the cache. You can refer here to configure for Cloudflare.
  • Cloudflare Account Email – Cloudflare email account
  • Cloudflare API Key – Cloudflare global API key.
  • Cloudflare Host – Your website domain.
cdn cloudflare

3.6. Import / Export:

This is to import or export your Swift settings to or from another website. I usually didn’t do this because each website has its own configuration.

4. Image Optimizer Tab (Pro):

Swift performance (Pro) also comes with unlimited image optimization. Serving correct image size will greatly improve the page loading time and user experience.

My recommended method is:

Upload exactly correct size of an image to the WordPress and then let Swift Performance automatically does the rest of the image optimization job (If you enable image optimization during uploading).

You can also do it manually for the existing images by going to the Image Optimizer to scan and optimize Images.

Image optimizer tab

5. Database Optimizer Tab:

WordPress will always store our revisions in the database which will occupy our server resources.

Swift Performance also comes with database optimizer feature which let you clean up your website.

database optimization tab

6. Critical Font Tab(Pro):

This is very useful because it can create a customized pack of Font Awesome which only include the icons you are using on your website. This customized icon pack is small and can be loaded faster.

You have to scan the used icons and then enqueue the critical fonts. Please check all your pages to confirm all icons are available after enqueue it. Else you have to manually select it and update critical font again.

critical font 2

7. Plugin Organizer Tab

This will let you configure which plugin to load or not load on a certain situation. Basically, I just leave every setting as default because the plugins that I’m using are reliable.

plugin orgamization tab

Wrapping It Up

Swift Performance plugin is so far I found out the most reliable and complete solution for the website speed optimization. It is just a single plugin which consists of all the robust features.

If you are hesitating on whether want to use it, it also comes with a free version (Swift Performance Lite) which provides a lot of the great features too.

Now it’s your turn…

Go ahead, set and test the settings to speed up your website.

If you wonder what else you can do to further optimize your website loading speed, you can learn more from this complete website speed optimization guide.

Affiliate Disclosure – Some blog posts and web pages within this site contain affiliate links, which means I may earn a small commission if you click the link then purchase a product or service from the third party website. For instance, A2Hosting, Astra Pro and Swift Performance affiliate links. Purchasing a product or service from the links does not increase your purchase cost, but it is a great way to say ‘thanks’ to me if you enjoy my content and find my suggestions helpful. Please note that I only recommend products and services that I have personally used or have thoroughly researched. The guidances are based on my personal experience and research. I really appreciate your action of clicking my links to purchase, this is a great motivation for me to keep going.,

Comments

Please feel free to comment below if you have questions, requests or feedbacks from my blogs. I will be glad to hearing your responses and reply to you as sooner as possible.

4 thoughts on “Recommended Swift Performance Settings to Speed Up Your Website – WordPress Cache Plugin (2019 Guide)”

  1. Thank Thol!

    You help me change my web https://shopcon.vn/ score from 80/60 to 95/94 (GTmetrix). I try many plugin, but SWIFT Performance cache plugin is best cache.

    I am very happy for the hight score on GTmetrix.

    Now, I have problem. My wewbsite have 2000 tag. I must delete by hand (2000 click).
    I have a question: how to prevent create tag on warmup table?
    Thank for your help!

Leave a Comment

Your email address will not be published. Required fields are marked *

About Me

Hey, I’m Thol. I hope the tutorials provided are useful for you. I will keep maintaining the tutorial and producing new and great tutorials time by time. Be sure to subscribe to my newsletter, I will keep you updated. Enjoy the tutorials.
Website Builder (6 Steps)
Website Speed Optimization