I’ve been using WP Rocket and already had 100% GTmetrix scores with a 1s load time (hard to beat), but Swift gave me near identical results. I stuck with WP Rocket, but I would rate Swift Performance Lite the #1 free cache plugin ahead of WP Fastest Cache, WP Super Cache, W3 Total Cache, and the others. The Swift Performance settings are relatively easy to setup (I’ll walk you through everything). The Pro Version includes an image optimizer (for lossless compression + automatic image resizing), critical fonts, compute API, and support for their plugin. Cool part is, they have an option to pay monthly so you can try it for only $3.99/month.
Swift vs. WP Rocket – these are usually the top cache plugins in recent Facebook polls…
- Free (lite) version = amazing results
- Mediocre documentation
- Free version includes plugin organizer
- Pro version includes critical fonts
- Pro version includes image optimizer
- Easier to configure
- Better documentation
- Facebook Pixel + Sucuri add-ons
- No plugin organizer
- No image optimizer
Both Swift and WP Rocket support Cloudflare, CDN, heartbeat control, preloading, lazy loading photos/iframes, hosting Google Analytics locally, minification, script merging, gzip compression, and other features. They are actually very similar as far as their features go.
The Wizard analyzes your site and helps configure basic Swift Performance settings. The out-of-the-box settings work great, but there are still more ways to optimize when you’re done…
Things You Still Need To Do
- Tweaks → Cache Gravatars
- Hearbeat → Disable All
- Google Analytics → Bypass Google Analytics
- Styles → Generate Critical CSS
- Caching → General → Separate Mobile Device Cache (if using AMP or mobile theme)
- Varnish → Custom Host
- CDN → StackPath CDN
- CDN → Sign up for Cloudflare and change name servers
- Optimize Images (using Swift Pro or Imagify/Imsanity)
- Database Optimizer → clean database
- Plugin Organizer → enable/disable plugins on specific content
The dashboard shows stats, like how many known pages Swift detected vs. how many are actually cached. Swift also assigns each URL a prebuild priority and the date eache page was last cached. In the Warmup table, you can also manually add URLs if Swift didn’t detected it.
The general, media, optimization, caching, and CDN tabs are broken down into sections:
- Disable Cookies – for GDPR when asking users to agree to cookies.
- Hide Footprints – hide swift comments in the source code.
- Use Compute API – speeds up merge settings and decreases CPU usage.
- Enable Remote Cron – Swift’s API server will call wp-cron.php and run WP cronjobs as real cronjobs.
- Debug Log – see warnings/errors shown in the log path (eg. public HTML folder).
- Normalize Static Resources – attempts to remove query strings, however these are usually generated by slow plugins. The main way to get rid of them is to deactivate high CPU plugins (found in GTmetrix Waterfall) and replace them with lightweight plugins.
- Prefetch DNS – anticipates external resources (eg. Google Fonts + YouTube videos).
- Collect domains from scripts – helps with prefetching DNS.
- Exclude DNS Prefetch – exclude domains you don’t want to be prefetched.
- Gravatar Cache – caching Gravatars usually isn’t enough, you also want to offload them to a CDN and load Gravatars locally as explained in WP Rocket’s Gravatar tutorial. This improves load times for posts with lots of comments, as some of my posts have 300+ comments where Gravatars have suck up over 50% of load times.
- Gravatar Cache Expiry – time Gravatar cache will expire (3600 is fine for most sites) but you can increase this if you notice it’s consuming too much CPU. If too high, users will never see the cached version. If too low, it can consume too much CPU.
- Custom Htaccess – setup redirects or use it for other things.
Speeds up WordPress admin and reduces CPU by disabling the Heartbeat API. This notifies users when content is being edited and allows plugins to send real-time notifications (adding requests). Disabling it saves CPU (WP Disable + Heartbeat Control plugin do the same thing).
- Optimize Images on Upload – losslessly compress images which fixes “optimize images” in GTmetrix (only for the page you test). Imagify does this too and is what I use.
- JPEG quality – keep at 100% to avoid lossy compression.
- PNG quality – keep at 100% to avoid lossy compression.
- Resize Large Images – resizes large imager to correct dimensions (many people upload oversized images). This fixes “serve scaled images” in GTmetrix. Imsanity does this too.
- Keep Original Images – when Swift resizes large images, it will keep the original in case the new image isn’t the size you want it, so at least you have a backup of each image.
- Inline Small Images – small external images are written directly into the HTML document, so the browser does not request those image files independently.
- Lazyload – only loads images once you scroll down the page and actually see them. While this improves initial load times, it also means users constantly see images loading as they scroll down, which can be annoying. That’s why I only lazy load videos + iframes.
- Force Responsive Images – uses the srcset attribute to provide several image sources for browsers so they can pick the right one.
- Lazy Load Iframes – only loads iframes once you scroll down and see them.
- Exclude Iframes – exclude certain iframes from being lazy loaded.
- Load Iframes on User Interaction – only loads iframes when users interact with it (using the mouse move, roll, or touchstart).
- Merge Assets for Logged in Users – disable, as it doesn’t improve load times and will likely do more harm than good, plus most optimizations should be on front-end.
- Optimize Prebuild Only – disable unless you want to control when cache is built.
- Optimize in Background – Swift will optimize pages in the background.
- Fix Invalid HTML – some plugins/themes use invalid HTML, Swift will try to fix this.
- Minify HTML – fixes multiple items in GTmetrix/Pingdom. Cloudflare takes care of this too, so you should only have 1 enabled (Swift or Cloudflare).
- Disable Emojis – emojis add requests and hurt load times.
- Limit Simultaneous Threads – speed of cache rebuild (lower if having CPU issues).
- Maximum Threads – lower numbers = less CPU usage (2 is good).
- DOM Parser Max Buffer – Swift developer set this numbers for a reason.
- Merge Scripts – many people say disable it, but I would test it.
- Exclude 3rd Party Scripts – enable if using Merge Scripts, disable if you’re not.
- Exclude Inline Scripts – exclude problematic files if Merge Scripts results in errors.
- Proxy 3rd Party Assets – Swift says it can fix browser cache issues in GTmetrix related to GA, but can break scripts. Bypassing Google Analytics is a better option. Test it out.
- Separate Scripts – saves merged JS files for pages separately. Generally this consume more CPU than it does good.
- Print merged scripts inline – only enable if using memcached and WordPress can’t write your files.
- Lazy Load Scripts – lazy loads external resources which can improve load times.
- Include Scripts – include certain scripts not detected by Swift.
- Merge Styles – recommended by Swift developer and fixes items in GTmetrix/Pingdom.
- Generate Critical CSS – CSS will be loaded asynchronously, however the developer says this can increase CPU.
- Print full CSS inline – developer says you shouldn’t need this.
- Separate Styles – disable unless you have pages with different content types (eg. some use Visual Editor, some use Page Builders, etc) and need Swift to generate a different merged CSS for each page. May improve scores, but can increase CPU. Test carefully.
- Minify CSS – enable, but this can cause issues so test your site (Cloudflare also does this, so only use one). If you see errors, exclude problematic files under Exclude Files.
- Bypass CSS Import – enable (this merges imported CSS files as well).
- Exclude 3rd Party CSS – if Merge Scripts is giving you problems, try this.
- Exclude Styles – exclude problematic files if minifying CSS results in errors.
- Include Styles – manually include styles if you’re not using Merge Scripts.
- Enable Caching – enable.
- Caching Mode – disk cache with rewrites is generally fastest for most sites. If you can’t edit the .htaccess file or Nginx config, use Disk cache with PHP. If memcached is installed, select memcached with PHP, but always try to use disk cache with rewrites.
- Early Loader – enable unless it’s causing PHP issues.
- Cache Path – specify directory for the cache path.
- Cache Expiry Mode – time-based is best for nearly every website.
- Cache Expiry Time – time cache will be regenerated. Too often and it will consume CPU, too little and users won’t see the cached version. 12 hours is good for most sites, but you can decrease this if you have time sensitive content (or clear cache manually).
- Garbage Collection Interval – how often Swift checks for expired cache pages. 30 minutes is good, too high and it will consume CPU.
- Clear Cache on Update Post by Page – add pages/posts where you want the cache to be cleared once it is updated, so users can see the new content.
- Clear Cache on Update Post by URL – same concept as previous settings, only by URL.
- Enable Caching for logged in users – enable if multiple users are logging into your site (eg. bbPress). This gives each user their own cached version, otherwise keep it disabled.
- Separate Mobile Device Cache – enable if using AMP or a mobile theme.
- Case Insensitive URLs – shouldn’t make a difference.
- Enable Browser Cache – enable.
- Enable Gzip – fixes gzip items in GTmetrix/Pingdom.
- Send 304 Header – disable.
- Cache 404 pages – enable, since spiders may be crawling invalid URLs and consume CPU. Caching 404 pages and serving them from a CDN cuts down on server resources.
- Ignore Query String – doesn’t cache pages that are different for each user (unique sales pages if you run FB/Google ads, membership profiles, conditional logic on forms).
- Enable Dynamic Caching – lets you specify cacheable $_GET and $_POST requests.
- Cacheable AJAX Actions – cache resource-intensive AJAX requests by specifying their names here.
- AJAX Cache Expiry Time – leave as 1440.
Depending on what assets your site uses, you may not want to cache certain static files (some common ones are eCommerce cart/checkout pages, admin, XML sitemap, and search pages.
- Exclude URLs – exclude specific URLs from cache.
- Exclude Content Parts – exclude specific content parts from cache.
- Exclude User Agents – exclude specific user agents from cache.
- Exclude Crawlers – exclude specific crawlers from cache.
- Exclude Author Pages – exclude specific author pages from cache.
- Exclude Archive – exclude specific archives pages from cache.
- Exclude REST URLs – exclude specific REST URLs from cache.
- Exclude Feed – exclude specific feeds from cache.
Warmup stores URLs in for the next cache prebuild. Each URL has a priority number (shown in the dashboard settings) where they can be adjusted manually. Lower number = higher priority.
- Enable Remote Prebuild Cache – Swift will no longer use an external bot for prebuilding and will use the background process instead.
- Prebuild Cache Automatically – prebuilds cache after it’s cleared. If using this, also enable “Optimize Prebuild Only.”
- Discover New Pages – if Swift can’t find all your pages, this will help.
- Prebuild Author Pages – prebuilds author pages.
- Prebuild Archive – prebuilds archive pages.
- Prebuild REST URLs – prebuilds REST URLs.
- Prebuild Feed – prebuilds RSS feed pages.
Enable Auto Purge – enable if using varnish cache – it will automatically purge it when Swift clears the plugin cache so you don’t have to do it manually.
Appcache downloads your site (or specific pages) into the user’s browser on their first visit, making your website available even when they’re offline. Sounds great, but this significantly slows down your prebuild and is not worth it. I highly recommend leaving these disabled.
- Enable Appcache for Desktop – disable.
- Enable Appcache for Mobile – disable.
I use StackPath ($10/month with 30-day trial) in conjunction with Cloudflare. StackPath has 31 data centers, Cloudflare has 150+. More data centers = faster content delivery, and StackPath’s are heavily located in the US which is where, at least, most of my visitors are.
Step 1: Enable CDN.
Step 2: In the StackPath dashboard, click the CDN tab, and create a StackPath CDN Site…
*Copy your server IP address as it is needed in step 4 of this section.
Step 3: Paste your StackPath CDN URL into the CDN Hostname field of Swift Performance.
Step 4: In StackPath go to CDN → Cache Settings, then click “Purge Everything”…
Step 5: Whitelist your server IP address in StackPath (WAF → Firewall).
Step 6: Run your site in GTmetrix and “content delivery network” should be green in YSlow.
Enable CDN on SSL – enable if using SSL.
SSL CDN Hostname – leave blank since hostnames are the same even if it’s SSL.
Step 1. Sign up for Cloudflare and you will be prompted to add your site and begin a scan.
Step 2. Once the scan is done, select the free plan, then Cloudflare will take you through a set of pages. You will eventually be taken to a page where Cloudflare assign you 2 name servers.
Step 3. Do a Google search for “how to change name servers on SiteGround” (only search for your host), then follow their instructions. You will be copying the 2 name servers provided by Cloudflare and pasting them into a custom name servers option in your hosting cPanel…
Step 4. Grab your Cloudflare Global API Key (found in your Cloudflare profile) and enter it into Swift’s Cloudflare tab. Use the same email as your Cloudflare account, and enable auto purge which purges Cloudflare’s cache when Swift’s cache is cleared (so you don’t have to manually).
MaxCDN / StackPath
You can ignore these options. StackPath bought MaxCDN and they no longer use an Alias, Consumer Key, or Secret. Simply create a StackPath CDN URL and enter it in the CDN tab.
- MAXCDN Alias – outdated (use StackPath CDN URL).
- MAXCDN Consumer Key – outdated (use StackPath CDN URL).
- MAXCDN Consumer Secret – outdated (use StackPath CDN URL).
4. Image Optimizer
5. Database Optimizer
The database optimizer deletes unused database tables (often left by plugins you uninstalled), transients, autosaves, trashed posts, spam comments, and potentially thousands of post revisions which are automatically stored each time you republish content. For the most part, it’s junk. Take a backup especially if you haven’t done this for awhile, as it cannot be undone.
6. Critical Font
Critical fonts let you select icons from Font Awesome and efficiently load only the ones you choose, as oppose to the entire Font Awesome library, making these icons load much faster.
7. Plugin Organizer
In your GTmetrix Waterfall tab, you may notice certain plugins are running on pages/posts where it’s not even being used. Contact Form 7 might be used on your contact page, but usually nowhere else (so it shouldn’t run anywhere else). My WP Review rich snippets plugin do this too. You can disable/enable plugins using Swift’s filters while adding multiple rules.
- Enable URL Match /contact/ to only show Contact Form on that page
- Disable certain plugins in your WordPress Admin to prevent CPU consumption
- Enable URL Match with regex expression to only show rich snippets on ‘review’ posts
8. Upgrade PRO
9. Test Results In GTmetrix
With Swift Performance…
With WP Rocket…
Swift Performance Lite blows other free cache plugins out of the water, even if you configure just basic settings using the Wizard. If you’re still have issues, see my full WordPress speed optimization guide which includes a list of high CPU plugins to avoid, lightweight plugin alternatives, AMP instructions, how to upgrade to PHP 7+, image optimization, and a link if you want to hire my developer on freelancer.com who helped me get a 100% GTmetrix score.
Why I Use SiteGround
I use SiteGround and have 200ms response times with 100% GTmetrix scores and .4s Pingdom load times. Do a hosting check, run your own tests, or click through my fast loading pages. They were rated the #1 host in 26 Facebook polls and are worlds better than EIG (Bluehost, HostGator), Godaddy, and other hosts who pack too many people on the same server. There have been plenty of people who migrated and posted results on Facebook and Twitter. Tweetafter tweet, post after post, poll after poll after poll, faster hosting will fix slow response times. They’re recommended by WordPress, do free migrations, and I use their semi-dedicated plan.
I use SiteGround because…
- My GTmetrix + Pingdom report speak for themselves
- They use PHP 7.3, NGINX, HTTP/2, Cloudflare, fast speed technology
- Average load time is 1.3s, giving most people instant speed improvements
- They’re recommended by WordPress and Ivica from WordPress Speed Up
- Free Let’s Encrypt SSL, easy to use cPanel, and features for eCommerce
- Renewal prices are a price jump, but you can get 3 years of the promo price
- Always been known for great support (tickets usually answered in <10 min)
- I always get 100% uptimes but 99.99% is guaranteed (includes daily backups)
- They do free migrations, have a migrator plugin, and 30-day money back policy
- They’re based in Chicago (my hometown) and have 4 data centers to choose
Affiliate Disclaimer – if you sign up for SiteGround using my affiliate link I would genuinely appreciate it. Each year I donate $3,000 to GoFundMe campaigns (2018 was to feed the homeless, and 2017 was to Hurricane Harvey). Your support helps, and I know there are tons of affiliates out there. I try to make my reviews unbiased and backed by evidence in the form of Facebook polls, tweets, and real conversations. If you don’t want to use it, here’s a non-affiliate link to SiteGround. Either way I truly believe they’re the best host and that your site will run faster/smoother… do your research on Google and Facebook groups and you’ll find most people say the same.
They have 3 plans:
Higher plans include more server resources (#1 factor in the WordPress optimization guide). Here’s the full comparison chart, but GrowBig gives you about 2x more server resources than StartUp, and GoGeek is semi-dedicated hosting which gives you even more. GrowBig and up comes with a free migration, staging, advanced caching, and ability to host multiple websites. GoGeek comes with priority support. Their cloud hosting is quite the price jump at $80/month.
You can see this on their features page…
Thanks for reading – drop me a comment if you have any questions!