My unofficial guide to speeding up WordPress with SWIFT Performance cache plugin! (Updated Dec 4, 2021)
The SWIFT Performance cache plugin was something I was really excited about because it made such a difference on my sites. I was previously cycling between 3 or 4 different cache plugins throughout various sites but can now replace almost all of them with just this one (my other favorite being LiteSpeed Cache).
The only thing lacking was official documentation as many users still don’t understand what each option does or how to diagnose when problems arise. Since most of the official Swift team is busy developing their plugin, I decided to write my own community guide.
Read on for my best SWIFT Performance setup tips!
I am NOT an employee or official Swift developer in any way. I wrote this unofficial guide to help Swift users because I’m such a big fan of this incredible cache plugin.
I’ve done speed miracles with it on hundreds of client sites and realized the time I spent helping users could free up Swift developers to focus on implementing my fantasy features, instead of playing tech support.
In the spirit of self-empowerment and efficiency, please enjoy my guide below!
QUICK Setup Guide
Here’s the 5-minute setup version for busy people. It doesn’t take much to get fantastic results out of this amazing #1-ranked speed plugin. Just make sure you aren’t blindly enabling everything.
(NOTE: I like my configurations so much better than the official Swift auto-configurations. For full explanation of why I chose these settings, see my DETAILED setup guide.)
- Install SWIFT Performance Lite (free version), or SWIFT Performance (premium). Click MANUAL settings, then Advanced View (top-right button).
- General > General – enable “Use Compute API” if you have paid version.
- General > Tweaks – put 301 HTTPS redirects into “Custom Htaccess” area here.
- Media > Images – disable “Lazy Load Images”.
- Media > Embeds – enable “Youtube Smart Embed” and “Lazy Load Iframes” if you have Youtube embeds or GoogleMaps NOT at the top of the your page.
- Optimization > General – disable “Optimize Prebuild Only” and “Fix Invalid HTML”. Enable “Disable Emojis” if you don’t use them.
- Optimization > Scripts – disable “Merge Scripts”.
- Optimization > Styles – disable “Merge Styles”.
- Caching > General – pick “Disk Cache with Rewrites” for Caching Mode, and “Action based mode” for Cache Expiry Mode. I’d use “Time based mode” only if your site has non-content updates often (like new comments or changes in product status).
- Caching > Tweaks – disable “Avoid Mixed Content”.
- Caching > Exceptions – exclude all post types except posts/pages/products or any other post types that are actually browsed on frontend with their own URL slug. Exclude any pages with contact forms. If you have WooCommerce, exclude the Account/Cart/Checkout pages.
- Caching > Warmup – choose “Unlimited” for Prebuild Speed if you have that option and your site is 1000 pages or less.
- Plugins > WooCommerce – enable “Cache Empty Minicart” but “Don’t disable” for Disable Cart Fragments, and disable WooCommerce Session Cache (BETA).
- CDN – enter your info if you have CDN.
- Hit [SAVE CHANGES] then [CLEAR CACHE], and Swift is done setting up!
- Check the Warmup Table – make sure all important pages are listed and pre-cache successfully. Click “Start Prebuild Cache” or go to Caching > Warmup and “Enable Remote Prebuild Cache” if they don’t. (It’s ok if a few weird items show up or some items don’t cache.)
- Check if your site is caching – visit your site in Chrome incognito window without logging in. Right-click anywhere on the page, click “View page source” and scroll to the bottom. If you see “Cached with Swift Performance Lite”, it is working! (Try refreshing the page if you don’t.)
- Enjoy fast speeds! – or read on for more tips and troubleshooting steps.
If you have problems:
- Swift should be super fast! – if you’re not getting instant page loads, go back and reconfigure things! (PS: it really helps to have good webhosting.)
- Site design or function breaking somewhere? – disable Merge Scripts and Merge Styles. Or re-enable them individually to isolate problems. (Don’t forget to purge your CDN or Varnish after content/cache changes!)
- Problem with https/SSL redirects? (or weird URLs showing on front-end) – put your 301 HTTPS redirects in “Tweaks > Custom Htaccess” instead of htaccess.
- Contact forms not working? Exclude contact page from caching, or just switch to Caldera forms. I’ve had issues with Contact 7 (and hate that it loads on every page).
- “Cached with Swift” not showing in page source? – maybe the page isn’t caching, but could also mean something is stripping out HTML comments. (Cloudflare does this sometimes.)
- Still need help? – follow my detailed steps below. Free support available on Swift knowledgebase, WP repo, Facebook group, or ticket support (for premium users).
DETAILED Setup Guide
STEP #1 – Install SWIFT Performance plugin
Install SWIFT Performance Lite (free version), or SWIFT Performance (premium).
Swift has few requirements but can work even if some of them aren’t available:
- Apache modules – mod_deflate, mod_filter, mod_setenvif…all 3 usually available on most servers.
- Loopback – this is when your server can visit itself. Sometimes not available if you block robots or indexing from crawling your site.
The modules aren’t required but help give the best performance. Most shared hosting accounts already have them; some VPS do not, ask your webhost/sys-admin to install. Most of you won’t have any plugin conflicts or rewrites issues, and if you do Swift tells you how to fix it. (NOTE: the script doesn’t detect LiteSpeed servers so the modules might be installed not detect, you are fine.) Even if you do see errors, continue anyway; Swift should still work.
STEP #2 – Go through Swift Performance Settings
Go to Swift settings and click [Advanced View] on top-right.
I’ve gone through all the settings and leave my detailed thoughts on them below. Anything I forget to mention means I left it at default settings.
General:
- General > Hide Footprints – disabled, so I can see Swift comments in source code. (FYI: Cloudflare may remove HTML comments.)
- General > Use Compute API (premium) – awesome feature, enable it! Speeds up cache pre-build and reduces CPU usage. Especially useful on big sites (over 400 pages) and/or slow server.
- General > Clear Cache Role – default is fine, unless you want to allow editors or other users to clear cache after making site changes.
- General > Disable Admin Notices – enabled. Remove ads asking you to buy paid version.
- General > Disable Toolbar – enable if you don’t Swift options in the top toolbar.
- General > Page Specific Rules – allows you to override global Swift settings on a per-page basis. Really cool feature, but only necessary for fine-tuning super bloated sites.
- General > Beta Tester (premium) – allows you to try the latest features. I wouldn’t recommend for production sites. But can be fun for your own personal ones that you maintain on a daily basis.
- General > Collect Anonymized Data – disabled for me.
- General > Debug Log – enable only when diagnosing problems.
- General > Disable Cookies – I don’t use it. It’s for GDPR purposes; if you’re using another mechanism/filter to load cookies only after GDPR is agreed to. Cookies are only used for appcache and identify user for GA Bypass, must be UNCHECKED if you use these features. Doesn’t impact speed either way.
- General > Beta Tester – don’t enable for production sites. Enough said.
- Tweaks > Custom Htaccess – put 301 HTTPS redirects here. (This is much preferred than using SSL plugin!) If for whatever reason this messes up your site or creates ugly URL’s, try putting redirects directly in htaccess instead (I recommend anywhere ABOVE the Swift section).
- Tweaks > Background Requests – haven’t used it but it’s awesome! Prevents unnecessary AJAX requests from slowing down your page-load. (For example, removing ajax requests that aren’t critical to users…post views, etc).
- Heartbeat > Disable Heartbeat – ignore this unless your admin area is slow (caused by certain plugins and/or many logged-in users). WordPress Heartbeat API is a cool function that tracks user sessions in admin and auto-saves content when editing, but can be CPU-resource heavy on admin and frontend pages. You can disable all except Post/Pages. If certain admin/front-end plugins stop working, then leave it all on but increase the frequency. (You can use Heartbeat Control plugin instead for more granular options.)
- Heartbeat > Heartbeat Frequency – fine, still wanna decrease heartbeat impact on your server but don’t wanna disable? Simply raise the frequency. I think 120 seconds is safe but honestly if you’re having heartbeat issues, you should just get better webhosting.
- Cronjobs > Limit WP Cron – WordPress unnecessarily loads cron on all un-cached page loads. Lowering this is a great idea if you have high cron activity.
- Cronjobs > Enable Remote Cron – usually disabled. Enable if your site relies on cron jobs that misfire because A) your host disabled WP Cron, B) all your pages are cached, or C) you almost never log into WP-admin.
- Google Analytics > Bypass Google Analytics – awesome idea of locally-caching the Google Analytics JS script and merging it with site JS (theoretically removes one external call to google). In terms of speed, it didn’t help so much but does give you a higher page speed score (superficial benefit). Only problem is GA won’t work on uncached/excluded. To guarantee 100% GA function during cache prebuild and on uncached pages, I stuck with CAOS plugin or my theme to handle GA.
- Whitelabel (premium) – useful for agency or webhost trying to hide their speed-up secrets. Lets you rename Swift plugin and description so clients can’t tell that you’re using Swift.
Media:
- Images > Optimize Images on Upload (also enables next 4 settings) – I prefer ShortPixel for image compression, but Swift can save you lots of money and negate yet another plugin on your site.
- Images > Image source – Media Library is the default option. But the wp-content directory is really nice for when you have other images in the wp-content directory and not attached to the default WP media library. Really cool option.
- Images > Image Optimizer – experiment and figure out what works best for your site. Would be great if I had a comparison idea of what percentage quality equals ShortPixel’s LOSSY or GLOSSY compression…but I don’t. Test it yourself.
- Images > Resize Large Images – useful for non-techies uploading oversized images straight off the camera. But otherwise, leave it off if you intentionally want large images for HiDPI (retina) screens.
- Images > Keep Original Images – leave enabled in case you want to restore originals later and re-optimize with another plugin, or to generate different media sizes. Or at least keep them until you find the best compression settings.
- Images > GenerateWebP – usually enabled. Generates WebP version of all images.
- Images > Serve WebP – use “picture elements” is the preferred option; use rewrites option if you have styling issues. How rewrite option can also fail if using CDN or Cloudflare. Test carefully.
- Images > Preload Image by URL – great to preload important images (like ones at top of page) to make them appear quickly.
- Images > Preload Image by CSS classname – more efficient way of preloading important images, by identifying their CSS classes.
- Images > Lazyload Images – disable! I hate lazyload. It’s a counter-intuitive tactic of speeding up page load by not loading everything. Guess what?…not loading everything initially means everything loads slower! Poor user experience and feels slower; annoying when scrolling quickly through busy sites or stores. But useless if you have only few images on most pages, and dreadful if you have images above the fold. Unnecessary if you’re on free CDN (Cloudflare), although can save you money if you’re on paid CDN. There are some rare use cases, like if you have really big images and/or many images AND your visitors don’t scroll quickly…but in 99% of cases, your site will appear to load faster without lazy load!
- Images > Exclude Images URL – exclude images from lazyload based on url string.
- Images > Exclude Images by CSS classname – more efficient way of excluding images from lazy load by using their CSS selectors.
- Images > Respect Lazyload Standards – should definitely by ENABLED, unless you want to override those settings from elsewhere.
- Images > Preload Sensitivity – specifies how soon lazy-loaded images should be loaded when user is scrolling to them. The 50-pixel default setting seems fine but you can always increase if users scroll fast (and you want the images to appear sooner).
- Images > Load Images on User Interaction – great tactic to only load images if browser is interacted with. Good way to keep server loads down and probably also improves page scores. It probably won’t make much difference if you’re already lazy loading images.
- Images > Inline Lazy Load Images – reduces HTTP requests by putting inline image request in base64 code. This should be left disabled IMO for modern browsers.
- Images > Lazyload Placeholder – choose your style of placeholder image. Most sites user transparent. Medium.com website likes blurred. Others do low-quality image. It’s really by personal preference. Images that aren’t key to the content don’t really matter. But if they are, you’ll probably want at least transparent to low quality.
- Images > Lazyload Background Images – hell no! Don’t enable this. You need those backgrounds (especially ones at the top) to come up immediately, or else your site appears slower!
- Images > Fix Missing Dimensions – useful to prevent layout shifts due to slow image-loads. But I personally don’t need it.
- Images > Force Responsive Images – most themes already have responsive images. Enable it if your theme/pagebuilder (I hate you, Thrive Architect) wastefully loads large images on mobile. If this feature fails to make your images responsive, leave it off.
- Images > Gravatar Cache – usually disabled. Only useful if you consistently have many comments. On my popular posts (500+ comments), uncached comment avatars alone make up 60% of the load time. But then again, why bother caching something that loads at the end of your posts anyway?
- Images > Gravatar Cache Expiry – I would use a long time like 1 month since most people never update their Gravatar images. And even if they did, who cares…it would matter if the cache doesn’t update immediately.
- Images > Inline Small Images – fantastic feature with lots of arguments for and against. Leave it UNCHECKED if you don’t know what it is, your small images aren’t at the top of your site, have many pages, or care about faster cache prebuild (like me). Try it CHECKED if you have many small images at the top (social or ecommerce icons) not using font format (FontAwesome), slow image calls, or very few pages. It’s probably better for small websites.
- Embeds > Youtube Smart Embed (enables next option) – clever! I like it. Creates an image thumbnail (appearing just like a Youtube embed box but without loading all the laggy assets), which loads the video when clicked.
- Embeds > Exclude Youtube Videos – disables “smart embed” function on chosen videos. Useful if you have videos at top of website and/or want them to autoplay.
- Embeds > Preload Sensitivity – specifies how soon lazy-loaded YouTube embed iframes should be loaded when user is scrolling to them. The 50-pixel default setting seems fine but you can always increase if users scroll fast (and you want the iframe to appear sooner).
- Embeds > Lazy Load Iframes (enables next 2 options) – clever! I love Swift for this. Useful if you have multiple iframe video/video embeds on one page AND/OR they’re located far below the fold. Don’t enable if you have iframes at the top of your pages, it will delay your perceived page load! Common iframes are Youtube embeds, Googlemaps, or Facebook boxes.
- Embeds > Exclude Iframes by URL – awesome! Use it to exclude important iframes (like ones near the top of the site) from lazy loading.
- Embeds > Exclude Iframes by CSS classname – more efficient way of excluding YT iframes from lazy load by using their CSS selectors.
- Embeds > Respect Lazyload Standards – should probably be ENABLED unless you want to override settings from elsewhere and use your lazy load settings.
- Embeds > Preload Sensitivity – specifies how soon lazy-loaded YouTube embed iframes should be loaded when user is scrolling to them. The 50-pixel default setting seems fine but you can always increase if users scroll fast (and you want the iframe to appear sooner).
- Embeds > Load Iframes on User Interaction – loads iframes only after user has clicked or scrolled on page. Great for iframes lower on the page.
Optimization > General:
- Enable Server Push – I recommend disabled. It speeds up sites by preloading CSS/JS assets for your other pages so they load faster when clicked. It’s more beneficial for sites with lots of CSS/JS, but also more likely to cause problems on sites with lots of CSS/JS (broken elements, laggy load, high CPU usage). Test carefully if you enable it. Page scores may appear slower since each page load is now loading more assets. I also think it’s unnecessary if your site loads the same CSS/JS for every page (which is already browser-cached).
- Optimize Prebuild Only – uncheck so your site is always optimizing. Enable to limit when cache is built (not needed for most sites).
- Optimize in Background – usually disabled, but can be useful for big sites and/or VPS servers. I have several sites with 100-200 posts on VPS and have been fine without it. You can play with it for yourself. This makes Swift function like those “on-the-fly” cache plugins, which negates the benefit of prebuilding cache.
- Optimize 404 pages – leave this DISABLED to save server space. You don’t need page optimizations (CSS, JS, etc) for 404 pages anyway.
- Prebuild Booster – I prefer disabled. It prebuilds using memory resources rather than CPU. On strong servers, I prefer it off. It’s probably helpful on shared hosting (to avoid hitting CPU limits).
- Disable Emojis – disable if you don’t use emojis in content or comments. Browsers already show emojis already, anyway.
- Limit Simultaneous Threads – disable if you have your own server or a small site (100 pages or less). Enable and set to 1, 2, or 3 if you’re on shared server or want to prevent site from hogging server resources. Ideally, you’d want to use all resources to prebuild cache quickly.
- Merge Assets for Logged in Users – disable if you’re the only admin user. It theoretically speeds up sites with many logged-in users (membership/forums/etc) by combining and delaying CSS/JS. But really, you should just stay away from this entirely due to potential broken styles or functions. It also doesn’t help page scores either since they can’t reach logged-in areas.
- Prefetch DNS – leave ENABLED. It preloads and reduces DNS wait for any visits to or assets called from 3rd-party domains.
- Collect domains from scripts – usually enabled. It scans and preload external domains found in javascripts, speeding up external requests. You might disable to avoid pre-triggering things (for tracking purposes).
- Exclude DNS Prefetch – excludes domains from prefetching DNS. I’d disable specific ones maybe to limit charges/triggers by 3rd-party asset requests?
- Normalize Static Resources – useless if you use “Merge Scripts” and “Merge Styles”. It improves higher page speed scores, but not actual speeds. I enable this but never for sites often updating their design. Many caching engines (also Cloudflare) already intelligently cache static assets with query strings.
- DOM Parser Max Buffer – I never mess with this.
Optimization > Scripts:
- Merge Scripts (enables/disables other options) – I wouldn’t merge JS if I were you. It combines all your JS files into one file and load. There’s a weird balance; it’s safer to use when you have fewer scripts (but less impact), has more impact with many scripts but also higher chance of conflict or delaying page load. The best use for it is to delay/lazyload some scripts. The worst use is for higher page test scores.
- Aync Execute – async execution sounds great but wasn’t checked by default. Maybe it breaks functionality when JS doesn’t load in order. Leave it off, or just test it carefully.
- Exclude 3rd Party Scripts – off by default, but it really depends. I think the tradeoff is between merging 3rd-party scripts (decreasing their external load time), VS keeping your overall merged scripts lighter. The more scripts you have overall and/or the more these 3rd party scripts don’t affect your overall load, the more I think you should leave them excluded. Otherwise, merging these 3rd party scripts will give you a faster page speed score BUT slow down your perceived load time for real users.
- Exclude Scripts – THIS is where you go to manually exclude javascript requests from merging. Enter a distinct word or text string instead of the entire url. (e.g. putting “special” prevents “https://domain.com/…/special-123.js” from loading.) The main reasons for excluding scripts are 1) to fix broken functions, or 2) to keep the script loading in its original order, e.g. not merging a slider script so that it can load first and render the top of your site faster. Merged scripts usually get deferred to the end of the page. I would probably exclude anything related to your pagebuilder or forms.
- Footer Scripts – love this feature but haven’t used it. It prevents non-critical scripts from being combined with front-loading scripts and further delaying your initial load. Honestly, all these little things to think about are why I don’t recommend merging scripts!
- Deferred Scripts – don’t merge this scripts, but keep them deferred. Good for any scripts that cause problems when combined, but you also don’t want them loading first (when excluded from combine).
- Exclude Inline Scripts – just like above but for inline scripts. Maybe you have Google Tag Manager or other scripts that need to load from exact positions in the code (header/body/footer). Exclude them by entering a distinct text string found in the code, like “tagmanager” for GTM. If it doesn’t work, just don’t merge JS at all.
- Footer Inline Scripts – I would not mess with this. If they’re inline, it’s probably for a good reason. This is advanced stuff!
- Exclude Script Localizations – enabled by default and I don’t know what it is so I leave it alone.
- Minify Javascripts – it increases cache prebuild time, I would disable this if you have many pages or use Cloudflare (which already does it).
- Minify with API – check it only if the default minify JS option above causes errors.
- Proxy 3rd Party Assets – I disable; it’s a vanity feature. Resolves longer expire times on 3rd party JS/CSS (Pingdom/GTmetrix complaint), but may break things.
- Safe Mode – might fix errors during JS combine.
- Separate Scripts – clever idea of generating different merged JS for each page instead of one global merged JS for all pages (loading scripts even on pages where they aren’t used). It’s useful if you have many different post types (pagebuilder, products, portfolio, gallery, forums, etc). Only issue is it delays cache-build and can eat up lots of space if you have many pages.
- Print merged scripts inline – awesome idea deferring JS load till the end! It works best if you don’t have much JS and the top of your site doesn’t use JS (menus, image sliders, critical pop-ups, etc….if any, exclude them). UNCHECK if JS is needed for initial page items or you like faster prebuild (like me).
- Lazy Load Scripts – amazing for preventing 3rd party scripts from lagging your site load (e.g. Tawk.to, ads, caldera, etc). Works beautifully and improves your page scores without affecting front-end function. Don’t use it for GA/GTM!
- Include Scripts – I never used but think it’s to include scripts that are called from other scripts which you excluded.
- Block Scripts – block scripts from loading. In case you don’t need them or want to refactor them elsewhere (like in header or footer).
- Disable jQuery Migrate – any site using updated themes/plugins can safely enable this. jQuery migrate is a javascript library to keep older JS code working.
- Preload Scripts – use this to load slow/bloated JS scripts that are necessary for page rendering (like visual elements near the top of the site).
- Custom Header JavaScript – useful for manually adding JS to the head to fix JS-combine issues. Of course, I’d rather not combine JS in the first place!
- Custom Footer JavaScript – useful for manually adding JS to the footer to fix JS-combine issues. Of course, I’d rather not combine JS in the first place!
Optimization > Styles:
- Merge Styles (enables/disables other options) – just like with JS, I wouldn’t if I were you. It combines all CSS files into one file. There’s a weird balance; it’s safer to use with fewer stylesheets (but less impact), most beneficial with more stylesheets but also higher chance of broken styles. The best use is to cache entire CSS with a long expiry time so users don’t have to keep downloading it. The worst use is doing it for GTmetrix/Pingdom scores. Since CSS is so critical to page rendering, I don’t recommend merging it (or at least not theme-related CSS).
- Generate Critical CSS – speeds up “perceived load time”, rendering the top of the site first. I think it’s unnecessary nowadays, causes FOUT issues and slows down overall load time. Test it on and off for yourself. I always prefer it off. I think “unused CSS” is safer option but also less aggressive; whereas viewport is faster but may leave out some necessary styling. This feature benefits more for super-bloated sites.
- Extra Critical CSS – add any other CSS that you need loaded ASAP on page load that was missed out by the auto-generated critical CSS.
- Extra CSS – add extra CSS to the regular CSS rather than critical CSS.
- Print critical CSS inline – puts critical CSS into the header instead of a separate file. I would only recommend this if your CCSS is very small and/or you only have very few pages on your site (like 3). Because otherwise you’re adding unnecessary CSS weight to each HTML requests when that CSS coulda been cached on its own as a static asset.
- Print full CSS inline – I don’t recommend it unless your page is super lightweight.
- Separate Styles – great tactic generating different merged CSS for each page instead of one global CSS for all pages (loading styles even on pages where they aren’t used). It’s useful if you have many different page types (pagebuilder, WooCommerce, forums, etc). Only issue is it possibly delays cache-build and eats up lots of space if you have many pages. I prefer it only on smaller websites with multiple page variations; big sites, I don’t merge.
- Minify CSS – I would stick to “basic” if I was going to use this at all. Choose “Don’t minify” if you prefer faster cache-building and/or already have it enabled from Cloudflare. Makes no impact on smaller sites.
- Bypass CSS Import – makes more sense to be enabled by default.
- Exclude 3rd Party CSS – try this if you have CSS problems.
- Exclude Styles – manually exclude CSS from here if you have CSS problems. Enter a distinct word instead of entire asset URL. (e.g. put”special” instead of “https://domain.com/theme/special-file.css”.) The main reasons for excluding styles are 1) to fix broken styling, or 2) to load it faster, e.g. not merging slider CSS so that it loads first and renders the top of your site faster. Merged styles are slower to load because you have to wait for entire combined CSS to load.
- Exclude Inline Styles – can fix CSS-merge issues. Some themes/plugins have CSS inline but Swift removes and merges it with global CSS. To put back inline styles, enter distinct text found in the CSS code. If you don’t know how to troubleshoot all this, just don’t merge CSS at all.
- Include Styles – clever but I don’t use it. It manually includes CSS, letting you prevent specific JS from loading without losing the CSS calls inside.
- Preload Styles – use this to preload key CSS files, ideally the ones related to your overall theme design and ATF items.
- Force Swap Font Display (enables next option) – in my opinion, DISABLED! It solves FOIT issue by giving you FOUT issue, which is much worse UX in my opinion. (Most people using this do it for higher page scores.)
- Exclude Force Swap Font Display – type name of font-family to exclude from force-swap. Good use case would be any menu fonts loading at the top of the page. As the font reload would look especially jarring to visitors.
- Disable Full CSS – clever way of disabling all unnecessary CSS but be careful! It may leave out necessary CSS so test it carefully. If having issues, can try adding missing CSS into “extra critical CSS” or just disable altogether.
- Compress Critical CSS – shortens the super long CSS class names to save some bytes. Useful if you have bloated plugins with super long CSS class names/ids (e.g. “ubermenu-item ubermenu-item-type-post_type ubermenu-item-object-page ubermenu-item-has-children ubermenu-item-9544 ubermenu-item-level-0 ubermenu-column ubermenu-column-auto ubermenu-has-submenu-drop ubermenu-has-submenu-mega”)… lol, yes. That’s a real class name.
- Remove Keyframes – remove CSS keyframe animations from critical CSS. Should be safe to enable unless you have animations or slideshows relying on CSS keyframes instead of JS at the top of your site. Just test it and see.
Optimizations > Fonts:
- Manual Preload Fonts – decide what fonts to preload. Probably not necessary IMO. Unless you got tons of slow-loading fonts.
- Use Local Fonts – if you’re loading any webfonts (from external sources), this saves and loads them locally. Beautiful feature!
- Exclude Local Fonts – in case you want to exclude any from being hosted locally. I imagine this is only for fonts that display weirdly on your site when loaded locally, or ones that are seldom used or called throughout your site.
- Force Swap Font Display – shows a fallback font if your custom fonts take too long to load…avoiding the FOIT issue. However, if you have lots of real-world experience, you’ll know that FOIT is nowhere near as bad as FOUT…which is what happens if you use this feature. Therefore, I highly DO NOT recommend this! (Seriously, think about it. Any text that really needs to be shown that fast…should probably not be allowed to use a fallback font!)
- Exclude Force Swap Font Display – exclude specified fonts from using swap-fallback display method. I don’t use this because I don’t bother with swap display at all.
Optimizations > HTML:
- Fix Invalid HTML – I disabled as I assume it delays cache building. Enable it only if site has an issue.
- Minify HTML – I assume it delays cache building (and no noticeable benefit) so I disable if I have many pages or slow server. Cloudflare already minifies HTML/CSS/JS also.
Caching > General:
- Enable Caching – you must ENABLE this. If you don’t see this option or even the “Caching” tab, your host is probably disabling cache plugins. WPengine and some other hosts do this.
- Caching Mode – disk cache with rewrites is fastest, disk cache with php is slightly slower but may have less issues. Some cache plugins (CometCache) prefer the php route. They argue it’s better but I only care what’s fastest. Memcached with PHP should be very fast as well but depends on your hosting environment. Memcached works better on VPS than on shared hosting.
- Early Loader – should be checked.
- Cache Path – check this directory if caching or prebuild doesn’t work; might be wrong path from old server. (Go to cPanel “File Manager” for the right path.)
- Cache Expiry Mode – I prefer “Action Based Mode” for 99% of sites. You can pick “Time based mode” if your site has non-content updates often (like new comments or changes in product status).
- Bypass Nonce – only available when using Action Based expiry mode. Basically extending nonce life indefinitely to match the cache expire. Sometimes site functions (e.g. cached forms) don’t work correctly because plugin nonces expires before the cache expires. This feature fixes that problem.
- Cache Expiry Time – normally I use Action Based Mode for expiry, which is basically an expiry time of “forever”. So if you’re using Time Based expiry mode, then pick whatever interval you think your site cache should be refreshed. That’s your call to make.
- Extend Nonce Life – sometimes site functions (e.g. cached forms) don’t work correctly because plugin nonces expires before the cache expires. This feature fixes that problem.
- Clear Cache on Update Post by Page – I don’t use it. Swift clears cache often.
- Clear Cache on Update Post by URL – I never had to use this since I use Action Based Mode 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.)
- Clear Cache on Update Post by Custom Rule – much more efficient regex/wildcard way of custom clearing multiple pages when posts are updated.
- Clear Cache After Update – probably better to leave this ENABLED. You might prefer disabled if your site is huge (takes forever or many server resources to preload) and has so many themes or plugins that update automatically.
- Enable Caching for logged in users – to be safe, only enable IF you have many logged-in users. Don’t enable “Share Logged in Cache” unless all logged-in users should see the same content, otherwise it crosses user data (e.g. user A sees user B’s info). You should exclude account/profile pages from caching in general!
- Separate Mobile Device Cache – disable! Only used if you have AMP enabled via theme/plugin or specific design or ads for mobile visitors. If you don’t know what AMP is, do not enable this!
- Enable Browser Cache – enable! It helps performance.
- Enable Gzip – leave enabled!
- Send 304 Header – disable.
- Cache 404 pages – enable only if you have a small site and/or the same non-existent URL’s are visited often. Otherwise, it can quickly clog up your warmup table.
- Cache Sitemap – love this function! Enter a sitemap url here so the preloader caches things in a more intelligent manner. Back in the old days, Swift was randomly scanning your site for urls and often preloaded unimportant pages first.
- Enable Dynamic Caching – one of Swift’s amazing advanced features, leave it alone for now. (Intended for developers or pros.) Can cache or allow compatibilities with features like multi-currency, etc. I’ll explain it later.
- Cacheable AJAX Actions – another incredible advanced feature. Leave it alone.
- AJAX Cache Expiry Time – leave it alone…unless you know that you need it longer.
- Ignore Query String – leave this unchecked!
Caching > Tweaks:
- Enable Proxy Cache – interesting feature I haven’t used yet. Uses Cloudflare’s “cache everything” rule to cache pages and get super fast load. Only issue is how to clear these pages upon changes or updated information.
- Proxy Cache Maxage – should be spelled “max-age”. Default setting is a day. Seems fine but longer is ok too if your site doesn’t update much.
- Proxy Cache Only – saves cached files only on the proxy. This is a good way to save disk space for large sites or sites with limited hosting plans. But I assume your site might load slower if the proxy cache is cleared and you don’t have a local cache?
- Ignore GET Params – use this to ignore certain URL parameters. All the standard FB, UTM, GA are ignored by default. But there might be more from whatever ad network you use or 3rd-party referrals.
- Avoid Mixed Content – disabled. It can create issues for asset URL’s! Only necessary if your site is still using HTTP but has some 3rd-party requests in HTTPS (like GoogleMaps). Most sites are in full HTTPS already!
- Keep Original Headers – I leave it enabled.
- Exclude Headers – exclude specified headers from your cached pages.
- Case Insentive URLs – I leave it disabled. Never had a use-case for it. All your URL’s should be lower-case anyway.
- Strict Host – basically generates cache only for one version of your site domain (with or without www). This probably helps prevent display problems related to that issue, but also save storage space. Good idea to use but make sure you have a permanent site redirect to force users to the right version of your site domain.
- Ajaxify Placeholder – display options your lazyloaded elements. You can use the default “hidden” which is empty until it loads, or a “blurred” box like Medium, or “show cached” which shows cached version until it updates to the live version afterwards.
- Ignore Query String – I don’t use it. URL’s with query strings exist for a reason…it’s risky to ignore them if you don’t know what you’re doing.
Caching > Ajaxify:
WOW, this whole section is freaken cool and clever!!!
- Lazyload Shortcodes – only use for shortcodes that aren’t used for ATF content.
- Lazyload Template Parts – very clever! You can practically lazy load everything below your ATF. Be careful that it doesn’t affect your SEO.
- Lazyload Nav Menus – can use for any menu except the ones loading at the top of your site.
- Lazyload Blocks – use to lazyload your heaviest/laggiest Gutenberg blocks, or ones that cause you a bad page score.
- Lazyload Widgets – lazyload widget positions that are slow-loading or causing bad page scores.
- Preload Sensitivity – decide how soon lazy-loaded elements should be loaded when user scrolls to them. The 50-pixel default setting seems fine but you can always increase if users scroll fast (and you want the images to appear sooner).
- Ajaxify Placeholder – display options your lazyloaded elements. You can use the default “hidden” which is empty until it loads, or a “blurred” box like Medium, or “show cached” which shows cached version until it updates to the live version afterwards.
- Lazyload elements – clever tactic of using lazyload to dynamically load parts of the site that shouldn’t be cached. For example: recent comments, related posts, recently viewed products, forms, etc. Anyone wishing for object caching or the ability to un-cache certain parts of their pages can use this feature.
Caching > Exceptions:
- Exclude Post Types – you should exclude all post types EXCEPT posts, pages, products, and any post type that shows on the front-end with its own unique URL slug. (If don’t exclude any post types; the site will cache all items even if they don’t show on the front-end, further delaying cache prebuild for critical items. Big sites should definitely exclude unnecessary post types!) Pro tip: it’s faster to type the first letter of items or press the down arrow key on your keyboard, than to click around.
- Exclude Pages – you should exclude any pages with “live info”, “private data”, or don’t work properly when cached. Good examples are pages with forms, dynamic WooCommerce (account, cart, checkout, wishlist), fancy sales pages (with tracking scripts), and any other dynamic/private pages.
- Exclude URLs – exclude any URL’s that couldn’t be single out using post types or pages above. You can use REGEX to exclude many URL’s at once. (I highly recommend adding “#revision#”, “#autosave#”, and “#json#” in here to prevent those items from caching. You can also add “/feed” or others as well.)
- Exclude Cookies – prevent users with specified cookies from seeing cached pages. Useful for showing live/updated pages for certain users.
- Exclude Content Parts – useful for excluding specific content or post types that show on multiple pages. Enter distinct text to keep specific content from caching.
- Exclude User Agents – prevent certain devices from seeing cached pages.
- Exclude Crawlers – prevent specified search engines or crawlers from seeing cached pages. They see uncached pages showing most recent content, but can also increase server load if they visit often.
- Exclude Author Pages – I check this. Author pages aren’t visited often, so focus your caching mechanism on other pages.
- Exclude Archive – I prefer UNCHECKED. Blog category pages are visited often and do run slow if not cached. Not caching them ensures they show the latest posts but it’s unnecessary as Swift rebuilds cache pretty often.
- Exclude REST URLs – CHECKED. You don’t need these items pre-cached.
- Exclude Feed – CHECKED. You don’t need these items pre-cached. They load fast enough and aren’t visited often. Plus, it can double the number of items in your cache table (how messy).
Caching > Warmup:
- Prebuild Cache Automatically – usually checked, one of Swift’s top features. (Only time you shouldn’t use prebuild is when you have so many pages, like over 1k, that server is always busy prebuilding, or you have so much traffic that they prebuild pages for you already.)
- Prebuild Speed – always try to use “Unlimited” if you have your own server/VPS or don’t have many pages (400 or less). If you’re on shared hosting with resource limits, pick one of the other options or your host might penalize you for “High CPU/resource usage”.
- Discover New Pages – it’s better unchecked, but you should enable this if Swift can’t find all your pages. Only issue is it sometimes caches many unneeded items but you can exclude them anyway.
- Warmup Table Source – auto is fine for smaller or lightweight sites with few pages. But if you have many pages and/or your server is slow, I highly recommend sitemap option to prioritize important pages first. Sometimes Swift prebuild mechanism will put low priority items first (like tags) which means your key pages take longer to precache after a purge.
- URLs page page – decide how many urls are shown in your warmup table. Higher number if you’re on a fast server and/or have tons of pages. Lower number if your warmup page takes forever to load.
- Warmup Priority – can drag this around but the default setting is best IMO!
- Remove redirects – this should probably be enabled. And also if you see them, you should find-replace these outdated URL strings in your site database.
- Prebuild Author Pages – UNCHECK. This option pre-caches author pages but I prefer caching them only when they’re actually visited.
- Prebuild Archive – this should be CHECKED to pre-cache category pages.
- Prebuild Terms – check only if you think users often click on your term pages (e.g. tags). Otherwise, leave it disabled if you’re one of those sites that only have like 100 posts but 1000 tags! (Basically, you don’t want your prebuild to waste time precaching tag pages instead of content.)
- Prebuild REST URLs – unchecked for me. Not necessary to prebuild these.
- Prebuild Feed – unchecked for me as well. Not necessary!
- Enable Remote Prebuild Cache (premium) – usually DISABLED! Use only when your server can’t visit itself and can’t prebuild cache; maybe because you blocked bots or indexing? It can speed up or slow down your prebuild depending on your setup, often fixing prebuild issues.
Caching > Varnish:
- Enable Auto Purge – enable if you’re using Varnish. It clears Varnish cache automatically, so you don’t have to do it manually every time Swift clears cache.
- Custom Host – usually not necessary, unless you’re using Cloudflare or other DNS proxy. Enter the Varnish server IP and port here.
Caching > Appcache:
Incredible feature but 99.99% of you shouldn’t mess with this!!! It can slow down your prebuild without any noticeable benefit. The feature downloads your site into the user’s browser on first visit, dramatically speeding up navigation. Keep in mind the default appcache size for devices (100MB for desktop, 5MB for mobile) as per official Swift documentation.
The 100MB desktop limit can actually fit an entire for most smaller sites (especially if you’re not merging CSS/JS). The 5MB mobile limit may or may not fit the entire site. There is where it comes in handy to cache only certain pages. Honestly, this appcache function alone is so beautifully thought-out it could have been its own plugin or at least a paid add-on. I am forever grateful to Swift for including special features like this!
PS: I don’t use appcache at all for my own sites! Regular Swift caching functions have been amazing enough! (Also, my sites are already coded super lean already.)
- Enable Appcache for Desktop – check to enable this feature.
- Appcache Mode – depends on the size of your site. Pick “Full site” if your entire site cache fits within 100MB, or use Exclude Pages function to make it fit. Pick “Specific pages only” if your site is much bigger than 100MB, or you prefer only specific pages for app-cache…then use Include Pages function to select them. I think most sites should pick only the main pages. This allows you to build/load appcache faster onto users’ browsers, focusing on the most visited pages. (FYI: your site cache size can be found on the Swift Dashboard.)
- Desktop Max Size – not sure how this applies. I leave it alone.
- Exclude Pages – clever addition! It’s great to exclude unnecessary pages from desktop appcache. Reminder: desktop appcache allows 100MB total.
- Exclude Strings – a more efficient way of excluding items from desktop appcache based on URL string.
- Enable Appcache for Mobile – check to enable. (NOTE: it uses more data.)
- Appcache Mode – since mobile appcache limit is only 5MB, you’ll most likely have to use the “Specific pages only” option and pick your most crucial pages.
- Mobile Max Size – I don’t mess with it.
- Exclude Pages – really useful since mobile appcache is only 5MB, so you should pick only your most essential pages.
- Exclude Strings – again, use it to exclude items from mobile appcache.
Plugins:
As always, Swift is on some next-level shit again! They have special optimization settings that show if you have certain plugins installed.
- Contact Form 7 > Smart Enqueue Assets – I love it! One of my longest standing complaints about CF7 was that it loads its CSS/JS on every page even when you’re not using forms! I’ve always told everyone to switch to Caldera but with this setting, you don’t have to (if you love CF7). Enable this but check carefully in case Swift doesn’t properly detect all your CF7 forms. Still though, you should switch to Caldera anyways!
- Elementor > Lazyload Youtube Background – enable this unless your video embeds are used in the hero section of your site. Another option, you can enable this but use the lazyload-exclude attributes for your hero embeds.
- WooCommerce > Cache Empty Minicart – enable!
- WooCommerce > Disable Cart Fragments (premium) – I usually disable! It speeds up that annoying WooCommerce admin-ajax call that lags your waterfall reports BUT disables your minicart count (the little number in the cart icon at top of your site). You can disable it on all pages, disable it only on some, or leave it on if it doesn’t affect the site/server much. It’s your choice. (Yes, this feature can replace the Disable Cart Fragment plugin by LittleBizzy.)
- WooCommerce > WooCommerce Session Cache (BETA – premium) – disable. It caches users’ shopping items in cart, but doesn’t work perfectly. Site sometimes feels slower with this on and sometimes mixes cart sessions between users. Test carefully if you use it.
- WooCommerce > Ajaxify Prices – only needed if your site shows different prices to different users (like based on location, etc). It lazyloads prices use ajax, after the cached page loads.
CDN:
- General > Enable CDN – check if you’re using a CDN. This feature does NOT replace your CDN plugin; keep your CDN plugin enabled if you have one. Swift’s CDN settings are only for purging CDN, not for activating it! (PS: Cloudflare is not considered a CDN in the traditional sense; use the Cloudflare tab instead.)
- General > CDN Hostname – put the hostname URL without the “https://”. It should be something like “cdn.yourdomain.com” or “yourdomain.cdn-name.com”.
- General > Use Different Hostname – in case your CDN uses a different hostname for SSL domain version of your assets. I’ve never seen this needed.
- General > SSL CDN Hostname – should probably be empty, as most CDN’s use the same hostname regardless of http or https.
- General > CDN Custom File Types – specify what files (extensions) to cache on CDN. I don’t understand why this is needed, don’t know if it’s a whitelist or what. Test with and without, and see.
- General > Exclude File Types from CDN – exclude files from CDN for various reasons. Maybe because of CDN costs, or because the file is loaded faster (or more reliably) from your server?
- Cloudflare > Enable Auto Purge – check it if you have Cloudflare. Otherwise, you’d have to manually purge Cloudflare cache every time you make changes on your site or Swift cache. (Make sure you enter your account email and API key.)
- Cloudflare > Cloudflare Auth Method – I guess it depends on which one you have access to.
- Cloudflare > Cloudflare Account Email – fill in your account email.
- Cloudflare > Cloudflare API Key – put in your Cloudflare global API key.
- Cloudflare > Cloudflare Host – put your domain name (without the www).
- MaxCDN (StackPath) > Alias/Key/Secret – fill it out if you’re using MAXCDN.
Import / Export:
I never use this as different sites will have different settings. Besides, I can configure Swift in only 2 minutes anyway. **TIP: whenever you import settings, check the “Caching > General > Cache Path” to make sure it’s the right address.
- Import/Export from FILE – safest option, it downloads the settings to your computer. To import a file, first open it up on your computer using code editor (like Notepad++ in Windows, or TextWrangler in OSX), copy all the text and then enter into the import box in Swift.
- Import/Export from URL – fastest option, you can quickly copy settings from one site to another. (Again, don’t forget to check the cache path!)
Hit [SAVE CHANGES], clear cache, and Swift is done setting up!
Go play around with the front-end (on incognito browser or any browser not logged-in) to test speeds. Or keep reading for more performance tweaks.
STEP #3 – Check Warmup Table
Check your SWIFT Warmup Table to see if it’s caching all your pages.
- CLICK the Swift Performance link from your dashbar (top) or admin side-panel (left) Tools > Swift Performance.
- SCROLL DOWN to Warmup Table and see if it’s caching all your content (posts, pages, products, etc). Big sites take more time.
- CACHE CATEGORIES – if some category pages don’t cache by default, enable “Prebuild Archives” in the cache settings.
- WAIT FOR PREBUILD – prebuilds should run automatically but if not, click “Start Prebuild Cache” or even “Reset Warmup Table”. It can take from minutes to hours depending on the website size. You’re almost ready to fly!
- CACHE NOT BUILDING? – don’t freak out if you see weird URL’s or that not all pages are cached. It’s normal behavior and fantastic that Swift has this warm-up table for you to diagnose issues. (FYI: many other cache plugins don’t cache everything either, but they lack a convenient table for you to know that.) As a diagnostic step, you can manually click “Cache page” on the uncached items or by visiting them on the front end.
- CHECK FRONTEND to see if your site is caching – open up Chrome incognito window and visit your site without logging in. Right-click anywhere and click “View page source”, then scroll to the bottom. If you see “Cached with Swift Performance Lite”, it is working! *CHEERS*
STEP #4 – Testing for issues
Without logging in, browse around your site on desktop and mobile. Everything should be fast, look and function normally. If everything is perfect, skip to the next step. If something is broken, it is 99% almost always because you enabled “merge scripts/styles”. (If you want my advice, don’t merge CSS/JS.)
Broken styling issues? (usually WooCommerce stores or pagebuilders)
…or broken functionality? (forms, sliders, or things not working when clicked)…read below:
- Go to Settings > Optimization > Scripts/Styles
- Disable “Merge Scripts” and “Merge Styles”
- Try the front-end again. If everything works, you can stop here (caching will still be really fast) or continue to isolate and resolve the issue.
Some of you will still insist on merging because you want that vanity page score. Ugh…I’m telling you, it’s not best practices for performance! But here’s what you can do if you insist:
- Re-enable one at a time “Merge Scripts” and then “Merge Styles” to isolate the issue.
- It’s usually just one CSS stylesheet or one JS script that’s causing the problem. You can try playing with the other Script/Styles optimization options to see if they solve the issue but that’s never worked for me. The proper way is to exclude that problematic CSS/JS (whichever one it is) from merging.
How to find and exclude problematic scripts/styles from merging:
- Isolation Method #1 – leave MERGE SCRIPTS and/or MERGE STYLES enabled, open up the site in Chrome > Developer Tools > Network (tab), and reload the page. Click the little red error circle to see which CSS/JS are missing. Exclude them from merging and see if things work.
- Isolation Method #2 – disable MERGE SCRIPTS and/or MERGE STYLES (or even caching altogether), and scan your site in Pingdom. Scroll down to the waterfall and sort the loaded items by file-type (neatly displaying all CSS/JS). Now go back to Swift settings and merge scripts/styles again but manually exclude whichever CSS/JS you think is causing the issue. (Hint: whatever’s breaking is probably related to the problem. Did a certain plugin or theme function stop working? Try disabling those CSS/JS.) Yes, it will take a lot of trial and error. It could be anywhere; maybe a plugin, maybe a theme.
There’s a lot I’m not spelling out because this is very technical and should be handled by advanced users. If you’re having this much issue with merging CSS/JS, you shouldn’t be doing it. It’s nobody’s fault…not yours, not the cache plugin, not your other plugins/themes. (Sure you can try another CSS/JS merge plugin like Autoptimize and it might work for your current setup but then break another day.) I really really don’t recommend merging CSS/JS!
The fact of the matter is: every WordPress extension requires it’s own set of code to function and when you mix different code together, conflicts may arise. For best practices over the long term, you really shouldn’t be merging CSS/JS anyway!
STEP #5 – Other features
You’re welcome to check out the other tools here but make sure you’re careful and make a backup if you don’t know what you’re doing. I’ll go over these in a more advanced guide!
- Image Optimizer (premium)– I prefer ShortPixel but this works, too.
- Database Optimizer – useful, but be careful not to break things! It doesn’t impact speed much unless you have thousands of auto-loaded transients. It’s more for reducing database size than for speed. (Yes, this can replace WP Optimize.)
- Critical Font (premium) – really clever feature! I can’t believe Swift thought of this…if only all custom iconfont services were this easy! For most users, it helps if you have Font Awesome 4.x and older. It regenerates icon fonts using only necessary icons so you’re not wasting 150ms loading the entire Font Awesome library of 5,000 icons on every page. (Newer FA 5 uses SVG.)
- Plugin Organizer – simply incredible feature and warms my heart. I can’t believe they gave this away for free. It should be a premium plugin or at least not overlooked by the community. It’s easy to use but from a caching standpoint, I consider this advanced speed-up strategy so I won’t cover it in this guide.
- Upgrade to PRO – should you do it? Is it worth it? Just to support this incredible plugin alone, yes it’s worth it. But as for what features make the most impact…Compute API (reduces server CPU usage), Enable Remote Prebuild (resolves many difficult caching problems), Image Optimizer (save money on image optimization), WooCommerce caching (more features), Whitelabel (hide your speed-up secrets), critical font (speeds up older FontAwesome).
STEP #6 – Final functions check
Make sure nothing is broken!
- Clear your cache, also purge CDN or Varnish (if you have them).
- Wait for caching to complete, then check every page.
- FRONT END CHECK: posts, pages, forms, shopping cart, affiliate tracking.
- BACK END CHECK: pagebuilders, other admin tools.
- CACHING: are the items in table caching? Do you see the SWIFT comments in the source? (Sometimes items don’t appear as cached in the table but are in fact cached on the front end.)
Known issues?
- Website is still slow – either your webhosting is really bad, website too bloated, or you have the wrong settings. Check other plugins, too. Anything with redirection, security, e-commerce, or causes many database queries can slow a site.
- Broken styles (CSS) or functions (JS) – disable merge scripts/styles. Also make sure your theme or other performance plugins are not trying to merge as well. (Avoid having multiple performance plugins doing the same function.) Swift appcache feature might also break CSS. Can also try regenerating CSS in your theme and other plugins as well.
- Broken visual elements – check “Optimization > General > Fixing invalid HTML”.
- Weird characters/symbols – disable GZIP from caching options.
- Contact forms not working – exclude the contact page from caching. Try switching to Caldera forms. I’ve had issues with Contact 7 (and hate that it loads on every page).
- Weird scrolling or screen refreshes – disable “smooth scroll” or other scrolling effects in your theme settings. And if the screen refresh won’t go away, please stop merging JS. (Or at least exclude the JS causing it.)
- Excluded/unwanted items still caching – unwanted items showing up in your warmup table? Try clicking [Reset Warmup Table]. Try disabling “Cache 404 pages”.
- Items not caching? – make sure cache directory address is correct and writeable. Try removing some items from “Exclude Post Types”.
- Items not pre-caching – make sure “Prebuild Cache Automatically” is enabled. Can also try “Enable Remote Prebuild Cache”, or other caching modes (less ideal). Make sure your robots.txt file isn’t blocking everything “Disallow: /” (common on staging sites).
- White screen of death (WSOD) or error 500 – it’s unfortunate but not every plugin is compatible with others. You can restore your site by deleting the Swift section in htaccess, delete “wp-content/cache” directory, delete “wp-content/plugins/swift-performance” directory, also delete “swift-performance-loader.php” in wp-content/mu-plugins directory. Another trick I’ve found is to change your php version, then change back.
- High CPU usage – some complain Swift causes high CPU usage, but this isn’t accurate. Swift has an aggressive (really fast) pre-caching mechanism that uses all available resources to pre-cache your pages. It’s much faster than other cache plugins taking forever to pre-cache your site (like 10 pages/hour). Some popular remedies: limit simultaneous threads to 1-3, turn off Merge Scripts/Styles, turn off minify HTML. You can also disable pre-building cache, but then the first visit will be slower.
- Swift Dashboard or Warm-up Table not loading – this can happen for huge sites with thousands of cached items. Change your “max_input_vars” to something high (like 5000). You can ask your webhost to help you with it. But either way…as long as you can access your Swift Settings and pages are caching on the front-end, you are fine!
- “Cached with Swift” not showing in page source – it could mean that the page isn’t caching, but could also mean something is stripping out HTML comments. Maybe you have Cloudflare enabled? Disable it temporarily and see if the comment shows.
- Weird www or non-www URL issues – place the proper htaccess redirects placed. You can do it in Swift’s custom htaccess, or open up your htaccess and put the code at the very top above Swift htaccess code.
- Cache size is HUGE – uncheck “Separate Scripts” and “Separate Styles” option, or better to just not merge them. Don’t cache for logged-in users. Also exclude unnecessary post types.
- Website still won’t load after deleting Swift – if you had issues and want to delete Swift, make sure you delete Swift from plugin directory, also mu-plugins, also remove Swift .htaccess rules. Then run manually trigger WP-cron. I’ve seen instances where Swift prevented WP-cron from running and so many cron jobs were backed up and lagged the server a bit even after delete. Once you’ve triggered WP-cron manually, it can be 5-10 minutes before your site regains useable state.
Need Expert Help?
I’ve tried my best to offer detailed advice for everyone. But there will always be sites that need special configuration. Still have problems? Contact one of the Swift support channels mentioned below.
- Free help is available on the Swift Performance Users Facebook group (fastest response, official support team and myself are on there), Swift Lite WordPress repo (slower response), or Swift website ticket (great option and more privacy for paid users).
- More explanations about features can be found on official Swift knowledgebase (not fully documented), or the free Facebook group above.
- If you need help but still insist on doing things on your own, please respect your level and avoid messing with settings that you don’t understand. Swift has features for newbies as well as developers and server experts.
If you would like paid help or even just a free look at your site, don’t hesitate to contact me. (I configure Swift on dozens of sites every month.)
Take care and may the “Swift” be with you! 😀
Support SWIFT Performance Plugin!
Loving the plugin? Leave them a nice review or buy the paid version.
Louise
Hi Johnny,
Having trouble with Google Ads not displaying in the position they are supposed to on my home page. As soon as Swift caches the home page, the ad shows below all page content instead of in the header. All other pages are OK, just the Home page.
How do I disable caching of the ad script? site: thesilverlife.com
Thank you for checking,
Louise
Johnny
Hi Louise, have you tried to disable merge scripts?
Julian
Hi Johnny,
is this about the last version of swift?
I see some other check boxes on that.
I have pro version.
Johnny
Hey Julian,
This is for the latest version of Swift. I keep it updated. I made a note in this guide that if I don’t address a certain option, that means I leave it on default settings. Do you have a question about a certain feature?
Julian
Thx for your reply Johnny.
I’m having some trouble with “reduce bounce rate” plugin.
After installing swift my bounce rate increased to 85% and it was 15-20% before. I have some time log settings and a scrolling event. It droped my organic trafic too and some keyword positions. Yesterday i switched swift off to test it and analytics logs events now. Waiting to see kw positions increase as before.
Johnny
Hey Julian,
Increased bounce rates could be due to anything. I highly doubt speeding up your site would mess with your bounce rates. Did you change your GA code placement or anything else on your site?
Hope to hear back from you.
Jano
Thanks Johnny for that awesome guide.
Johnny
Hey, thanks for stopping by Jano. How’s your site speeds compared to before? (I peeked at your source code.)
Ascar
Hello, Johnny.
Can you tell me more about how to enable Lazy Load Scripts, specifically for Tawk.to? What exactly do I have to insert into the lazy script field? Documentation is not really helpful “if one of these strings is found in the match.” What match? Documentation should say something like if one of these strings matches scrip name or or script file name or something like this.
Johnny
Hey Ascar…type in “tawk” and that’s it! Let me know if you can’t get it working.
Ascar
Thank you, Johnny.
This is exactly what I did. However I would like to find a way to check whether the script is really “lazy-loaded” – do you know how to do that?
Johnny
Do you have a URL? You can see it from the waterfall.
Tanya
Johnny,
Amazing post! Not only that it is easy to follow, it actually helps people understand better about the differences of all the options.
Plus, I had the best Page Speed and GTmetrix score after using d5 plugins/combinations and tons of different settings! I wish I came across this page a week ago!
btw, the links you included in your blog post are great too. It will be helpful if you set them as open on a new page so ppl as I was on this page for like hours while reading other posts you inserted in this article.
Johnny
Thanks for the suggestion, Tanya. I probably need to fix links across my entire site.
Ascar
Hi, Johnny.
As I am using Cloudflare, I believe, Cloudflare strips everything from the code when it delivers content ( all code modified/injected by a cache plugin, this is how it works with Comet).
If Cloudflare is disabled then all scripts are showing where they should be while Tawkto is on the very bottom of the source code – does it mean that Tawkto script was lazy-loaded?
Johnny
Run your site through GTmetrix, and look at the waterfall. If you see Tawk being loaded at the end then yes, it was lazyloaded.
Rushikesh
Hey! johnny thanks for sharing the amazing guide.
After installing this plugin and when would we click on setup wizard.
There is one message.
”
CPU Benchmark
Result: 1s.
Webserver & Rewrites
Apache detected. Rewrites are working. Please enable the following Apache modules for better optimization: mod_deflate, mod_setenvif, mod_filter.”
How to fix this. Whats’s benefit?
Johnny
You’ll have to ask your webhost to install those if possible. Swift will still work regardless. If you have LiteSpeed, they might be running but not detected.
varun
Hi,
I am facing strange problem. If I clear cache , all optimization go away. My site start showing large numbers of requests. And then plugin don’t work unless I run setup wizard again.
Do you have any idea what can be wrong?
I have tested plugin on my live as well as staging but same issue come.
Staging with plugin installed-https://bv9.469.myftpupload.com/
Live site with WP Rocket- https://hardhatengineer.com/
Johnny
Hi Varun, it appears to me that you aren’t following my guide to the T. I stopped checking everything else when I see CSS being merged. Your settings are not the most ideal and I think you may have other conflicting plugins. Can you get me access?
Van den Broek
Hi Johnny,
Since I installed swift performance lite my analytics data is totally messed up. I have spikes with direct visitors from strange countries and have almost none organic search result.
Also i dont see traffic from my phone but do see traffic from some other places. All this wasnt before i installed the plugin.
Any idea’s what i can do to help this?
Johnny
Hi Van! Are you using the GA Bypass feature? If so, please don’t use that. Where are you pasting your GA code? Also, do you have AMP or mobile-verson of your site instead of just mobile-responsive?
Allan Summers
Hi Johnny
I have used this plugin with your settings on a couple of other sites and it worked wonders mate.
However, I just did the same to another site and I cannot log-in to the back-end of the site, it just refreshes and refreshes without logging in.
Any suggestions my friend without deleting the plugin?
BTW I did a before and after speed test of this site and the before was Page Speed a D and took 17 secs to load.
After the plugin activated with your settings:
An “A” – 94 and took 9 secs to load.
But …..
Regards
Allan
Johnny
Hi Allan, your problem is related to HTTPS I believe. Where are you pasting the HTTPS redirect code? In Swift or in your htaccess?
Allan Summers
Oh! Thanks Johnny, that has not been done.
How do I do that? 🙁
Johnny
It’s explained in the guide above! You don’t see it?
Allan Summers
Argh yes, thanks mate, all good and that fixed that problem nicely.
I use Divi and since activating Swift Divi builder does not want to play along now.
Johnny
I”ve gotten DIVI to work with Swift before. It can definitely work!
Allan Summers
Hi Johnny
Maybe it was something that happened when I updated to the latest version.
Thanks for all your help my friend, you are a star LOL
Regards
Allan
Johnny
😀
Fernando
Hey Guy!!
Awesome post, Thanks I just but Pro version 😀
Johnny
Awesome, Fernando! I hope you’re really enjoying it. Let me know if you have any issues.
Karl
That’s a heck of an epic post! Well done. Good on you. It’s obvious this was a very time consuming labor of love. Thank you! 🙂
I just discovered SPL and it’s giving me incredible results in combination with SG Optimizer (Siteground). I mean, A 90+ scores at Pingdom and A (100%) scores at GTmetrix.
I’m having trouble with one installation, which is why I went looking for additional help. Your article here is really useful and I’ve bookmarked it.
It didn’t help with the issue I’m having, but I may well be referencing it down the road. Let’s hope not, but you never know. 😉
Keep up the good work. Shares like this make the web worth keeping. 😛
Nick
Thanks Johnny, I’m getting great scores with your settings, but increasingly, I’m having problems with sites using Beaver Builder ? Beaver Themer. Layouts break, menus display gigantic versions of the hamburger icon (especially with Ultimate addon menus), so that the black bars of the icon fill the entire screen. Are there any special settings to use Swift with Beaver Builder that you know about? This happened with WP Rocket occasionally as well. Usually on sites using Varnish. Deactivating Varnish seemed to solve it, until now…
Johnny
I wouldn’t be able to tell you without seeing your site and having admin access. You can start by trying the things I mentioned in the troubleshooting section.
Chris
Nick – did you find a reply to your issue? I experience similar problems and found that excluding CSS and scripts from optimizing helps. But weirdly not always. Thus looking for solid answers…
Hutch
Hey Johnny,
Just wanted to pass along my thanks for putting this together. There are tons of settings in the plugin. I build most of my sites with Divi and the Divi Builder, HTTPS, properly sized and compressed images and CloudFlare. I usually get great results by just running the Setup Wizard from the dashboard. I also use CloudWays for hosting which I have found in testing vs. shared hosting really helps a lot.
Thanks again for the great details in your post – I frequently help others with slow loading sites and this post is great for that.
Johnny
Thanks for stopping by, Hutch! Glad I could help and I wish you and your clients and the best.
Will Hooke
G’day Hutch,
My name is Will and I’m having issues with Swift caching all the entries in the Divi Library.
I assuming that is partly why I am having actual pages “falling out of cache” as there are so many Library items that are getting cached needlessly.
Have you ever tried to exclude all the Divi Library entries from what gets cached?
Thank you for your time.
Cheers, Will.
Johnny
Are you merging scripts and styles? And yes, please exclude DIVI stuff from cached post types.
Rohit Chourasia
I installed as per the above article, but there are no Woocommerce related settings available. I dont want cart/checkout/my account pages to be cached.
Johnny
Hahaha, hey man! Good to see you here already. Hope you’re doing fine now. 🙂
David Macias
Love the instructions and all your other post, thank you. I have the paid version, lifetime and loving it. Having a couple of issues with Oxygen sites, mostly on mobile and particularly with the Envira Gallery not showing images correctly. Any suggestions?
Johnny
Have you tried disabling merge scripts/styles? Also, do you have AMP or separate mobile mechanism?
Shaun
Thank you for this. I just switched from my long time trusted WP Fastest Cache to Swift and WOW!… what a huge difference, however I did notice afterward a few strange things going on in some of my css afterward which is how I found your article. I believe it sounds like combining scripts is the culperate so I’ll be shutting that off in a minute. Thanks for outlining all the settings so thoroughly. 👍🏻
Johnny
Happy to hear it’s helped you, Shaun. Your site is fast!
PingSunday
Hi Johnny.
I’m using Autoptimize. This plugin minimized JS, CSS.
Now with your amazing article, I have replaced Fastest Cache with Swift.
Question 1: Should I keep or remove Autoptimize/Async JS combo?
Question 2: I have the big problem with GA (Google Adsense): So many javascript installed in my sites. From loading 2s -> 5s with GA. Any proposition?
Thank you Jonny
Ernest Burden
Thank you for all the info and the lead to Swift.
I switched from WP SuperCache to Swift and my page loads are now almost 10 time faster.
I am having a weird issue: When I go to mysite/wp-admin and try to log in I get a “500 Internal Server Error, page can not be displayed, Return to home page.” Clicking on the home page link takes me to my home page, but now logged in. (whew!)
Just wondering if you’ve seen this or have any suggestions. I’m off to look for plugin conflicts.
Thanks again for all the info.
Johnny
Which webhosting is this?
Lisa
I’m having the same issue but mine says too many redirects. I’m unable to log onto my site using wp-admin. Took me a while to figure out what the problem was but when disabling the swift plugin my site’s login works normally again. I think there is a plugin conflict somewhere. It was working fine until a day or 2 ago. Should I try change the heartbeat settings? Will keep watching this forum for updates.
Johnny
Don’t mess with heartbeat settings, I think your htaccess is causing issues. If you can post it here or in a pastebin would be great.
Ernest Burden
My sites are hosted by Canspace Solutions. Canspace.ca
Johnny
Ahhh yeah, I’m not surprised. You can see my negative review of them here: https://wpjohnny.com/best-wordpress-hosting-reviews/
Ernest Burden
Thanks for the info.
I’ve been very happy with their service so far and they have always responded to my help requests very quickly. So, I’ll contact them regarding this issue and see if they can help.
I did look at the link to your wordpress hosting reviews but pretty much all of the companies have servers located in the US. which is not an option.
Thanks again for your help.
Johnny
I’m curious to know why you think “US servers” are bad/unacceptable? Many Canadian have similar ping times from the US. Besides, if the US server is located in a major port, it’ll also have faster access to the rest of the world which your site might have to route through anyway. In any case, I’m sure you can find a better host located in a Canadian center. Toronto is a big hub.
Jesse
Hey Johnny, just FYI our combo plugin Speed Demon is also free and still bundles our Disable Cart Fragments feature:
https://wordpress.org/plugins/speed-demon-littlebizzy/
Check back in a few weeks and there will be several more modules added to Speed Demon (e.g. Minify HTML). Cheers!
https://wordpress.org/plugins/minify-html-littlebizzy/
P.S. I totally agree re: merge/concatenate CSS and JS files esp. after HTTP/2 has been introduced… there’s a reason why no site in the Alexa top 1000 use these janky methods…
Jira
Hi Johnny,
I have followed your guide and really love using SWIFT.
However, one problem that I didn’t see when using WP Fastest Cache is that SWIFT caused my dropdown/sidebar login redirected to my-account page for logging in again.
I already excluded page (i.e. my-account, and login page) and also excluded relevant URLs (i.e. /my-account, and /login) which could not help.
Does SWFIT not compatible with dropdown/sidebar login? Do you have any ideas?
Thanks for nice review.
Johnny
Are you merging CSS or JS?
Fatima
Hi Johnny,
Thanks for this great update. I’m also using swift performance light (free version). Great tool but i have a question. My homepage praktijkmijnlijf.nl/home is not prebuilt cached. When i do this i get the status ” redirected”. When i check my site speed GTmetrics gives me a great score. When i go back via google i get the message that my pages are not mobile friendly and when i check it i get some error messages.
So i removed my prebuild cached homepage and the error messages are gone but my site is much slower 🙁 do you maybe have some for me so i get a much faster site? Thanks anyways.
Cheers,
Fatima
muatheme
Thanks for the review.
Tang toc
Very informative Article!
Andy
Hi Jonny,
I got really inspired by your article as I am still looking for a caching/minifying plugin that works for me.
Using the light version to see how it works, all my images on the shop page disappeard once the site was cached.
Did you ever get across this?
Cheers Andy
Johnny
Disable image lazyload.
Alex
Hello Johnny, great manual. But after i set up all the options according your manual gtmetrix told that Leverage browser caching has F grade (0) This means that cach dosent work at all at my site? Right?
Johnny
Link me to the test scores.
Li-An
Hello thanks to you for the guide but I’m a little surprised about lazyload and merging. Have you some documentation about your choices ?
Johnny
Test for yourself and see. Then you’ll have all the documentation you want. Also, different sites and different servers will perform differently.
Aron Thang
A great article, however I follow the same guidelines as the article but the index of my website on Pagespeed Insights is very low.
I’m not technically knowledgeable, looking for help. Thanks you!
Joxpa
Hi amigo I followed your recommendations and installed Swift, front end is fast but admin is very slow wth some peaks from time to time… there is other cache plugin should I try combining with Swift ? maybe one that cache databases queries ? my cpu is constantly high for bots…
Thank you ! merry xmas!
Johnny
Don’t combine plugins. Simply use a slower precache option. How many pages is your site?
Martin
Hi, I moved over to Swift several weeks back and the speed gained was amazing though; the hamburger icons on the elementor mobile dropdown vanished. From there I disabled the merging of script and the icon returned and with that the site is so slow. Is this a known problem, maybe run Autoptimize along side ?????
Martin
Haha, me again. Just thought I would pop in save some time and all; Compress Critical CSS is the problem !!!! Back on track ……..
Johnny
Hahaha, I keep telling people not to enable those but yes, you figured it out.
Nick
Hi I have two Qs, hope that’s OK!
* I keep getting a “Swift Performance – No zones found” error message. I’ve googled it to no avail. Could you shed any light please?
* And every time I make a change to the site I have to re-login, which is getting really boring. Is there a setting I should change?
Many thanks!
Johnny
Sounds to me your WordPress settings are wrong. Check the WordPress address and Site address to make sure they’re matching.
j.p.narayan
my website desktop in 96% improve, but mobile does not improve you are suggested.
Johnny
Link me to the test score.
Ricardo Souza
Ficou show! com essas dicas
meu site criação de sites https://www.martexweb.com.br ficou uma bala
Laura
This rundown is fabulous! Last night and this morning, I went through this for one of my sites. I followed the recommendation of not merging css and js, not optimizing html, and predictably my gtmetrix scores went down, but first paint is all over the place. With merging enabled, and all the settings inside at work, first paint was consistently around 1.5 seconds. The problem is that without the merge setting, we lose all other optimization options. Even with prefetch URLs on, google fonts (I’m noticing) often holds up everything, waiting for server response. As a result, sometimes first paint is less than a second, sometimes it’s over 4 seconds. Do I need to reinstall Autoptimize and Async JS so I can do some optimization without merging? Or should I enable merge and then one by one exclude a bunch of scripts just so first paint isn’t held hostage? Questions questions.
Johnny
I think you’re looking too much at GTmetrix instead of using your own eyes. Compare merging and not-merging with only your eyes. And see which one loads faster to your naked eye. I would not recommend using Autoptimize and Async JS with Swift if you’re aren’t experienced with configuring cache plugins…but you’re very welcome to try. If you don’t want first paint to be held down, don’t merge anything that’s used near the top of the page…like pagebuilders, sliders, etc.
GalaxyAndroid
Hi there maese Johny, first of all awesome article about Swift Performance config. I am looking for a specific help for caching only posts and pages in my web, but swift detects all my entire site, tags, products, category unused and so on…
I added every item on the list except posts, pages and products, and even resetting warm up tables, still loading for cache…
Am i doing something wrong? I´m using Pro version
Thanks for your time, i´ll visit you often for more interesting articles. Greetings from Spain
Johnny
So you excluded the unwanted post types and they still show up???
noi
Awesome guide. Thanks for keeping it updated.
RadioGyan
Hi Jonny!
Excellent guide
Using Swift has definitely improved my site performance. I am also using Cloudflare and have set it up to use cache eveything
The issue I am facing is that the front page wont be cached (It says MISS in the response header)
Are there any settings to be changed in the htaccess to make it cache the main page so that TTFB is reduced.
I checked using PingDom and GTmetrix as well. Thanks
Johnny
Your front page is caching just fine. I don’t like the lazyload on your site. And maybe the very VERY slight FOUC.
RadioGyan
Thanks for the review Johny. How can I get rid of the FOUC.
I am using the most common Google fonts so I assumed that they will already be cached in most user browsers.
Johnny
You can do it by following my guide exactly which I see you have not.Stop merging CSS/JS.
RadioGyan
Will try and get back to you.
Thanks a ton.
I did read more about merging css and javascript. You were bang on. Cloudflare too recommends that with newer http protocol you do not need to merge elements.
Thanks.
Mike
Hi Johny,
Still dont understand how to use “Exclude Scripts” functions. What to add to be at top. Can you please explain better?
I follow your guide for 3 hours but still bad results on gtmetrix 79% / 62% and page speed insights 2 / 40.
Great guide!!!
Thanks
Mike
Johnny
Then please don’t merge scripts! Send a link to your test scores and I’ll see.
Mike
https://gtmetrix.com/reports/happywoman.sk/2YAgPVJX
Johnny
Your site speeds seem fine to me. Get rid of REVslider and/or get new webhosting if you want better performance. Most of your load time and low scores are caused by 3rd party scripts. Your situation really ain’t that bad, man!
Mike
I have dedicated server with Hetzner and have good network admin. Should I tell him something? You mean get rid of revolution slider at all? Or just turn off the plugin on other pages? Thanks
Johnny
If you have a good admin, ask him about server tuning. I recommend replacing Revolution Slider entirely with another slider plugin, like Meta Slider or Smart Slider.
Mike
how can I defer parsing javascript? I am using around 45 plugins and all are important
Johnny
Define “important”. And are you sure deferring them is what you want to do?
Christina
Hi Johny,
I have problem with Cookiebot plugin. It doesn’t work if the Swift Performance is on. What can I do?
Johnny
Are you merging scripts and styles???
Christina
No, it’s disabled.
But I have this problem:
Uncaught SyntaxError: Unexpected identifier
at CookieControl.Cookie.runScripts (uc.js:1)
at CookieControl.Cookie.triggerOnloadEvents (uc.js:1)
at uc.js:1
I tried to exclude js, but didn’t help.
ami chi
hi,
i did all you write but my site is loading is too much.
i use avada theme and swift lite plugin.
ami chi
https://gtmetrix.com/reports/www.myelectrician.co.il/yGwHWDzm
Johnny
Ouch, looks like you need some professional speed optimization. I see several things not optimally-set. Try a different CDN. Also, you’re testing from a farther server location. You might benefit from a faster webhost as well.
Jenn
Hi, thanks for the guide.
I noticed that my swift performance got sitemap xml url in the warmup table.
Please may i know is it normal?
I am using siteground hosting and i found my htaccess got these lines
ExpiresByType application/json “access plus 0 seconds”
ExpiresByType application/xml “access plus 0 seconds”
ExpiresByType text/xml “access plus 0 seconds”
Johnny
Swift (and any other cache plugin) can sometimes cache things that don’t need to be cached. You can exclude it. You can get rid of those extra lines in htaccess. Make sure you disable SiteGround caching completely.
Miklos
Hello. Thanks for great tutorial. But I`ve got some issue with swift plugin. It blocks normal work of my login plugin(login via sms). Maybe somebody knows how to exclude plugin from cache?
Johnny
Which page is your login plugin affecting? Perhaps you can exclude it from cache?
Miklos
It blocks normal work of my login plugin(login via sms DIGITS plugin). When I purge cache it works fine. Maybe somebody knows how to exclude any plugin from cache at all? I dont use merge script or css option, so I cant exclude js files via swift “Exclude Scripts” function. Maybe I can write some rules at nginx config or use another way to exclude plugin from swift cache? I`ll be very thankful for any help. Thanks.
Johnny
I don’t think you can exclude plugin from cache. Better to exclude the specific page from cache (if it’s only on some pages)…or if the login function is on every page, then you can make sure you aren’t merging JS. Hard for me to diagnose otherwise without seeing the site and plugin mechanism for myself. I’m sure if you read their support page/forums, other users are probably having conflicts with caching as well. That would be the case with ANY cache plugin, not only Swift.
Chris
Hi Johnny, my site won’t work after installing the plugin https://westmorelandhistory.org/. The slider navigation buttons are not working, Event Page are not displaying . How to fix that
Johnny
Have you tried not merging scripts and styles????
Abraham
Hello Johnny, I follow the tutorial, but I am using elementor, I have a lot of request and my score on pagespeed is 4, GTMETRIX E and F and Pingdom D, the load time in the las two is variable between 5.4s and 2.34s. The thing is is work better when merge script but I have a problem using inline scritp like Amazon products because when I merge Swift put everything after the footer website (visual footer) at the end of everything.
Johnny
You can always exclude certain scripts from merging.
Tobias
Hi Johnny,
thanks for your great tutorial at all!
I still have one question and hope, you have an idea, what I need to do.
GTmetrix reports on Pagespeed “Serve resources from a consistent URL” and shows this:
https://cdn1.tobiasglawe.de/wp-content/cache/swift-performance/www.tobiasglawe.de/js/desktop-scripts.js
https://www.tobiasglawe.de/wp-content/cache/swift-performance/www.tobiasglawe.de//js/desktop-scripts.js
I use KeyCDN.
Johnny
Ignore that. That recommendation doesn’t apply to you.
Amitesh
Hello Johhny,
First of all thanks for the guide, you really helped me in configuring my sites.
I am not sure whether its a known issue to you or not but when I use swift performance (PRO) to my sites, on mobile versions, they load twice, the site loads for a second and then reload again. This is really troubling for my viewers.
Am I missing something ?
Johnny
Swift can sometimes conflict with certain themes and plugins. You’d have to test one-by-one until you figure out which function it is. It might also help to check out console errors.
Regev
Hey Johnny, is Swift the best plugin for NGINX servers? Better use Breeze/SimpleCache? I remember your list of best caching plugins, you said that there might be some rewrites needed for Swift to work best on NGINX? What are those? Reason I’m asking is because I believe it caused a major fault at my site.
What happened is a major page on my site got completely stripped off the search engines, with a warning on the search console:
Submitted URL not found (404)
I went to the affected page once I saw the message, and it did show a 404 message, but once I logged in my WP dashboard, boom that page went live again automatically. Did it ever happen to you before? Are there any NGINX rewrites I should put in so things like that don’t happen in the future – or am I just better off with something Nginx-native like Breeze?
Thank you, looking forward to your reply.
Johnny
I wouldn’t recommend Breeze or Simple Cache for NGINX servers. I think Cache Enabler would be a better bet although Swift and WP Rocket should work as well. Thing with NGINX servers is that they usually already have their own built-in server caching mechanism and then all you really need is a purge plugin. I really can’t advise you in a general direction; it really depends on how the stack was set up.
Shopcon.vn
Thank Johnny!
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.
Thanks!
Johnny
Happy for you but please don’t make every link open a new window. 😉
Sigit P
I’m using swift performance lite. But, minify javascript not work for my site. Any solution for my website? How to minify js using Swift Performance lite?
Johnny
Why don’t you use the other minify options? There’s more than one. Or can even disable from Swift and simply do it from Cloudflare.
Nader
Hi Johnny,
Thank you for this guide and recommendation. I’ve researched endlessly through FB groups and Google and your name kept coming up.
My host recommended that I use Litespeed cache (installed at the server level) as it’s better than Swift Performance (installed as a WP plugin).
I really don’t feel like losing Swift Performance but could that be true?
Thank you sir
Johnny
If you have 400 pages and/or not lots of traffic, Swift wins. LiteSpeed is better if you have 1k pages and/or lots of traffic. Webhosts are biased to pick LiteSpeed since they don’t allow crawler and it can’t use resources prebuilding cache like how Swift can. 🙂
Nader
Is lots of traffic like more than 20k users per month? What’s an estimate of traffic that would classify as lots of traffic? 😀
Thanks for the response!
Nader
I have 10k users visiting per month, at what point would I switch to litespeed?
Johnny
1k/day would be good but even where you’re at now is probably enough to see LiteSpeed’s benefits.
Sandeep
I keep getting this error – Serve resources from a consistent URL in gtmetrix, so my google speed test score is only 54%. Kindly help
Johnny
Share the test URL on our FB group and we can help you.
John Whitlock
Im on cloudways so was using the breeze plugin, this the started causing problems caching wp-admin so as recommended by cloudways support I removed it. A file has been still been left behind, I think advanced-cache.php but can’t find it so waiting for support to fix.
Giving swift performance ago thought I had better read your guide, it wasn’t necessary.
Running an e-commerce shop my previous load times was 2.5s now no tweaks it is 0.8s awesome, front page is 0.3. If you check my site and load time is still not good check the waterfall to see if breeze still causing trouble, it’s random. Need to test more but really happy with that speed. https://www.whitlockwoodendesigns.com/
Johnny
Happy for you, John. Btw, looks like you can get rid of lazyload and also fix some URL rewrites (pointing to staging domain?).
dwayne
hello johnny thanks for the massive information you gave out it was really helpful in getting around with swiftperformance settings.
I have mp3 files on my post pages and whenever i analyze the post page with gtmetrix and looking through waterfall i notice the mp3 files are loading with the pages and this is increasing the load time for the post pages and the size of the page also increases significantly.
https://imgur.com/a/Re0Qj3M
please check the above picture its a screeshot from gtmetrix and this is a sample link to post page https://muzzmusic.com/noah-cyrus-lonely-mp3/
André
Hello Johnny,
thanks for your great tutorial. I’ve got a question about the cookies set by this plugin. I cannot find any information about the cookie which will be set by swift performance lite plugin. Did you have any information for what purpose which cookie will be set?
Thanks in advance and best regards.
Johnny
I believe it’s for GDPR? To remember their setting of whether they accepted it or not.
Rio
Hey Johnny. I bought Switch Performance Pro with your link hoping that you got the business. You’re doing a good job with your recommendations.
I have two questions, though. After tweaking the Pro version, I was able to get perfect scores, which I don’t care much about, but my load times vary from 0.6 ms to 2 seconds. My page size is down to 323 KB and 14 requests. Theme is Generate Press Premium. No page builder. Hosting with Siteground GrowBig plan.
I don’t understand how a 300KB page can take 1.5 seconds to load.
All the woff/woff2 files and Google Font downloads take most of the time off of my total load time reported by GTmetrix. The biggest chunk of delay is the Blocking time (light brown line). It seems that the blocking time is the amount of time that the browser/client spends waiting for local resources to become available. Is that because the server is putting a hold on the remote client because it’s not ready for more requests? I’m trying to understand this concept. How can I reduce this Blocking time?
My second question is related to the amount of time spent receiving the unified CSS and JS scripts from my CDN (I use BunnyCDN) when I’m making changes to my website. This could take about 500 ms or more. After a while without making changes, it seems that these files settle (local and CDN) and transfer time from CDN goes quick leaving most of the load time on the Blocking time I mentioned above. Is this how this is supposed to work?
Thank you!!!
Rio
Johnny
Hi Rio,
Thank you for your comments and support. Can you link me to your GTmetrix test scores? I can answer more accurately after seeing them.
Rio
Hey Johnny, I don’t have them saved, but I just ran this one:
https://gtmetrix.com/reports/ithrive.health/zczwLjXB
The blocking time isn’t too bad, but shouldn’t it smaller? Blocking time went from about 550 to 300 after I activated Preload Font Loading on Swift’s latest beta version.
Now, when I’m updating posts, the purple time for lines 2 (css) and 3 (js) goes up to about a second to two. Crazy.
Thank you for your time on this, though!
TienDung
Thank you for this guide and recommendation, Let’s test this plugin
Kathir
Thanks for the awesome guide, works well and its better than wp rocket. its difficult for newbies to setup this plugin, i was getting css breakups. but after following your settings solved the problems..
Regards,
kathir
Ben
Hi. This guide has helped tremendously. Thank you!! Can you tell me what is making my “add to cart” take so long? Or how to fix?
Johnny
Glad it helped you, Ben. Unfortunately, add to cart can’t be cached so it has to be processed dynamically. It takes so long because your web server is slow. It is also due to your plugin usage. You can run Query Monitor to see which plugins are causing the slowness or you can manually disable each one and reload frontend. It can also be due to your theme and/or pagebuilder. Take your time and test carefully.
Chris
Hey, CAN YOU HELP? I have an issue were content on the page I need to load is now being blocked. Which section of the plugin can be used to allow wp-admin/admin-ajax.php
Other than this, website is lightening fast now 🙂
Johnny
Try not merging CSS/JS.
chris
Hey Jonny, it is related to the CSS/JS merge, but when switching it off I lose most of my performance benefit.
wp-admin/admin-ajax.php is used to load a quiz on page from a plugin. Is there anyway to exclude this particular entry in swift?
Thanks for your help
Johnny
What makes you think you lose most of your performance benefit?
Victor
Thanks for a really nice guide! I had some problems with Caldera Forms not being sent when using Swift, but I solved it by changing the Cache Expiry Time from 12 h (default) to 10 h in the Swift settings. This might be a good option if there is a form on every page, taking away the option to exclude single pages. See https://calderaforms.com/doc/caldera-forms-submission-rejected-token-invalid-mean/
A question. Divi has a few built-in options for speed improvement:
1. Minify And Combine Javascript Files
2. Minify And Combine CSS Files
3. Static CSS File Generation
Would you recommend to toggle them on or off when using your recommended settings in Swift?
Johnny
Hey thanks for stopping by, Victor.
– To be safe, I highly recommend not caching any page with contact forms at all. You can check it yourself…have 2 different computers submit a contact form within an hour of each other and see if both go through without any abnormalities.
– I simply don’t combine any CSS/JS with Swift but I do let DIVI combine CSS/JS. That’s because it’s only combining it’s own files which is safe and not likely to conflict with itself. Static CSS file generation is definitely better than throwing it inline IMO.
Victor
Thanks for a quick reply! I will definitely try that out.
Victor
What’s your opinion on “Serve WebP Background Images”? I didn’t see that option in your list.
Johnny
I don’t like to do it because it’s annoying when people try to save and view images from their desktop. I think the only worthwhile gain is maybe if you have a giant transparent image…in that case, WEBP is way more size-efficient than PNG.
Tobias
Anyone had this before? Somehow, only the homepage is cached by swift performance, but no other pages. The warmup table runs smoothly through without any trouble.
Johnny
I’ve seen all kinds of issues before. Hard to know without seeing it for myself. Did you check the debug log?
Tobias
There some of these:
10. February 2020 08:35:47 [Warning] Can’t find image id: https://www.tobiasglawe.de/wp-content/plugins/woocommerce-gateway-stripe/assets/images/mastercard.svg ( Memory:39.00Mb CPU:1.11% )
and some of these: 10. February 2020 08:36:05 [Warning] Can’t send header: swift-performance: MISS Headers already sent in on line 0 ( Memory:9.20Mb CPU:1.12% )
PLESK 17.8.1.X, PHP 7.3.5 (FPM) on NGINX, opcache enabled.
No Proxy Mode and Plesk NGINX caching is deactivated.
NGINX Configuration on PLESK:
http2_push_preload on;
server_tokens off;
if (!-e $request_filename) { rewrite ^(.*)$ /index.php?q=$1 last; break; }
###BEGIN Swift Performance###
# ——————————————————————————
# | Compression |
# ——————————————————————————
gzip on;
gzip_disable “msie6”;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon;
###END Swift Performance###
### BROWSER CSS CACHE ###
location ~* \.css$ {
etag on;
gzip_vary on;
expires 60d;
add_header Cache-Control “public, no-transform”;
}
### BROWSER JS CACHE ###
location ~* \.js$ {
etag on;
gzip_vary on;
expires 10d;
add_header Cache-Control “public, no-transform”;
}
### BROWSER MEDIA CACHE ###
location ~* \.(ico|gif|jpe?g|png|svg|eot|otf|woff|woff2|ttf|ogg|webp)$ {
etag on;
expires 90d;
add_header Cache-Control “public, no-transform”;
}
# Security
location ~* wp-config.php { deny all; }
location ~* “^/wp-content/(?!plugins/).*\.php” { deny all; }
Johnny
I’m a little confused what the issue is here. It shouldn’t be trying to cache those image links. I believe you can exclude them, no?
Tobias
I have tried Media -> Images “Exclude Images” and “Exclude Images URL” but it won’t help and those files are still in the log with the “Can’t find image id“-Warning.
Brand new is this warning: Skip asset merging, current page is not cacheable. URL:/wp-login.php
Click on “View cached” in the warmup table for a specific URL works in Backend.
Johnny
Pass me your wp-admin info and I’ll take a look for you.
Tobias Glawe
Thanks so much! Which e-mail?
And how much is that going to cost me? 😉
Johnny
Ahaha, as free as possible! Use the contact form (link somewhere in the bottom). But you’re welcome to buy me a beer if you feel that much guilt.
Tobias
Okay, finally found a solution to fix this issue:
Server: nginx (native, not in proxy mode in PLESK)
Installed the Nginx Helper Plugin, set Caching Mode to “Disk Cache with Rewrites”,
used Rewrite Rules from Dashboard and replaced old Swift Performance Rules in PLESK Domain’s Web Server Settings – Bam, caching works on every single page without trouble.
Trong Ky
Onother reason is in domainname.com.conf
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
shoud replace as
location / {
try_files $uri $uri/ /index.php?$args;
}
And it can cache all page
RichardHK
Hi Johnny,
On a SiteGround GrowBig account and replaced the SG Optimizer and Supercahcer today with Swift Performance Lite. Went through your detailed setup line by line and all seemed to be fine.
Had no idea what “CDN Hostname” to use as no info on Cloudflare site, just a couple of unanswered questions on same topic! 🙂 Talked to SiteGround support who pointed me to the DNS setting of “www.brookstradsingcourse.com.cdn.cloudflare.net” which I used.
Was testing on incognito browser and all looked fine. However, when I went back to my admin logged-in account on normal browser, I found ALL styling of site had gone! Just 1990’s html page with links. Ouch. Could not even get into admin area. Not sure if non-admin users got same but no emails received, and a dozen or more online at time.
Got back in by renaming swift plugin folder via cPanel file manager, then restored/reactivate Swift to see same problem.
Solution was to remove the CDN Hostname from the Swift CDN settings and all working again. The only other thing is Swift Dashboard shows no caching taking place (0 Cached Pages, 0 Cache Size), but waram up table showing cahced pages??? Anyway, need to fix this serious unstyled content first.
Any comments? I have joined the Swift Facebook group and awaiting access to follow up there, but thought good to drop comment here if others (like in CF forum) get same trouble.
Johnny
Hi Richard,
If using Cloudflare, the only area you need to mess with is the Cloudflare section. The reason is because Cloudflare does not operate like a traditional CDN (where you load static assets from a sub-domain). Cloudflare is a DNS service and performs its caching at the DNS level. In other words, you don’t have to redirect static asset requests to a subdomain (to cache them) because the assets are already cached by the time visitors hit your server.
Morgan Reece
Hey Johnny,
I’m confused by your answer.
My setup: Siteground + Cloudflare free + SWIFT Lite.
Does your answer mean I should leave the CDN toggle on SWIFT Lite off?
PS The latest Lite version of SWIFT is missing many of the options in the video (the General>General options- only 1, and it’s locked; Heartbeat option is gone; video embeds gone). I found this tutorial for editing Heartbeat manually & will use your settings: https://www.siteground.com/tutorials/wordpress/limit-heartbeat/
The current SWIFT CDN enable only asks for a CDN hostname (no Cloudflare toggle option). I don’t have a DNS setting like RichardHK’s in my Siteground DNS records.
Thanks again for another awesome post!
Morgan Reece
Oops ignore my PS about missing options — I’d accidently toggled back to Simple View. Duh.
But the CDN option is only a toggle to enable, plus hostname and enable diff hostname for SSL.
Still unsure if I toggle CDN on or off if using Cloudflare.
RichardHK
Hi Johnny,
Thanks for your quick response. Ok, understood, so will give it time to settle down and see how it goes. Still got no cached pages/MB on dashboard, although Warmup table still working through site, so guess when it is ready it will update.
Ref Warmup table, I’m getting pages with affiliate referral refs being cached which is odd. How do I exclude them, if needed? Affiliates use their referral ref on any page they wish. Most odd.
Still sitting at exact same GTMetrix scores 91/74 since moving to Swift, with SG optimizer deleted and all SG caching off.
Best regards,
Richard
PS. Just got into Facebook group and digging through the messages. Have already disabled gzip as a result. 🙂
Johnny
You can exclude them using the exclude post types feature. Can also go by text string if they share a common string in the URL.
Nyaroon
Nyaroon Here,
Hi johnny nice to meet u, i already try ur guide for a whole weeks and overall it’s awesome all my website changes from 8s + to 1s =
https://gtmetrix.com/reports/www.jualdisini.id/1KAqdnTE
but all my sites i try this settings got same problem that’s why at Incognito all my post or all my new updated is not showing, it’s like it’s stuck and become permanent how should i solved it i already try all ur settings and play with all settings, only admin can see changes but user can never see changes, please help me T.T
Thanks
Johnny
Are you talking about content updates or style updates?
Mairon Brainer
Hello, congratulations on the great article. You can do a step by step on how to use the Plug-in Organizer, get a little lost when using this tool.
Johnny
Ahhh yikes! It’s tough to explain. I will have to make up some common scenarios and then show how I would go about it. I will give it a try! Thank you.
Neal Umphred
JOHNNY
Thanks for the article/instructions on the fantastic Swift Performance plugin.
I just downloaded the Lite version and used your guide/suggestions along with those of WPBuildMaster to set up the plugin. I now have my blogs performing better (100% and 98% on GTMetrix) and faster (under 2 seconds) with Swift Lite alone than they previously did with WP Fastest Cache + Autoptimize!
Keep on keepin’ on!
NEAL
PS: Hoping the Swift people have the smarts to hire you to do their documentation.
Johnny
Thanks for the great news, Neal!
Mohd
Hi Johnny,
thank for your article , for me I have great score on gtmatrix 99/93 with images cdn only , but why on google page speed it’s not mobile 40 desktop 75, and FONTS problem how to solve it.
Johnny
How does it load to your eyes?
MOhd
to be honest not fully 100% i keep changing the setting to get the best performance for example now im facing couple of issues ,with the FONT problem the site keep showing solving host problem its make the site lagging , and this huge site of cache ! i really dont know why i have 2 site 1 multilang and 1 single on the single language https://prnt.sc/s0t9aq and this one multilang site https://prnt.sc/s0t9jr if you see the difference both are the same setting the same theme everything almost the same but the multilang better i dont know why also better score on google and has almost 40 plugins , the single lang onle 21 , and btw did you try the speed on FIREFOX its horror if you got 3 on chrome on FIREFOX 7
Johnny
Haha…hard for me to know what you did or what’s different about them.
Mohd
Its not really strange ! Nornally caches should be small or big file size for example 17mb for page its normal!
Torsten Wagner
Hi Johnny,
i’m using Swift Performance lite on many sites now. You say that it clears the age by itself many times, but i nearly have warning messages nearly every time i open the dashboard of on of my sites. (like this: “Updater process has been finished. Page cache probably should be cleared.”.
I use an external update service (InfiniteWP) – could that be a reason, or do you also notice that message? I didn’t found such mentions via google.
Best,
Torsten
Johnny
I wouldn’t know without seeing it for myself…hmm….
Fabio
Hi, is there a way to disable the plugins on a per post type? I want some plugins to work only on posts and others only on pages. Thanks!
Johnny
If it’s not in the plugin organizer function, then I guess not. But another thing…if your CPT has a unique slug, you can use that. 🙂
jojo
thank you for sharing. I am going to apply in my own wordpress site
Paul
Do you know how to reduce the ajax.php job on the frontend. Heartbeat disabling did not help – https://w3b.ee
Johnny
You have to find out what’s making that call. Did you check the referrer?
Tyson
Hi – Don’t know if you’ve ever seen this before but I installed the Swift Performance Lite plugin and followed your guide. My traffic tanked on my site today, and I couldn’t figure out why. Then I saw that most of my pages were loading with what looked like a messed up character set – sometimes working, sometimes not. Here’s a screenshot: https://snipboard.io/WAEdlh.jpg Spending some time troubleshooting, it was this plugin causing the issue. 🙁 Some kind of incompatibility? Maybe a question for the developers of the plugin but curious if you had any ideas. Thanks!
Johnny
Yes, it’s very common. I thought I covered it in the guide but I didn’t. Go disable GZIP from the caching options.
Tyson
Thanks. I reactivated and disabled GZIP. Now some of my pages look like this: https://snipboard.io/phABKa.jpg Deactivated it again…
Johnny
Ok, that’s a CSS issue. I wouldn’t be able to tell without seeing it. Check all your settings and don’t forget to regenerate CSS in your other themes and plugins as well.
Hosting domain
But some times when I check my site via GTMetrix , I see that some of my site files takes long time to load
FP , CP and onload time.
after make 2nd or 3rd check in same time I see same file got compressed and takes less time in load
as u see in picture name:2
otherwise one of my competitors using same server, cloud flare and swift performance. His website always give me better score when check it !!
Jason
Hi Johnny,
Great post! Quick question – do you know if the latest version is compatible with Php 7.4? I get 4,5 warnings in my hosting panel after doing a compatibility check.
Thanks!
Johnny
It works for me. Warnings are ok, errors are not.
Jason
Actually 5 errors including – in this directory /home/…./wp-content/plugins/swift-performance-lite/modules/cache/cache.php
I know you’re not officially linked with the team but just what i’m seeing
Alexis
Hey Johnny, thanks for the great tutorial again! I usually use LS Cache but wanted to give this one a try and I love it too (+ I used on a website not on a Litspeed server).
I do have a quick question though : I know it’s best not to cache pages with a contact form but how should I do for forms who are displayed in a pop up ?
I’m working on a website where there is a “Ask for a quote” button in the menu on that displays a pop up with a contact form in it when a user clicks on the button. Therefore it’s displayed on a every page.
The pop up has been created with Elementor Pro and the contact form itself with the form builder from Piotnet / PAFE Pro.
Thank you all the way from France !
Johnny
I think if the form shows through a popup, you are probably ok. Try it!
RogerM
How does this stand in comparison with WP Rocket?
Johnny
I already have several guides comparing them. You can try this one – Swift Performance vs WP Rocket – WordPress Cache Plugin Comparison
Alexis
Well after testing it actually IS a problem to have the form in a popup. I’ve made changes to the form to have a button to have multiple files attached (before changes users could only attach one file).
The old button (attach one file only) shows up on every page except the ones excluded from caching. I’ve tried everything I could (clearing cache, warmup tables, disable / re-enable Swift, duplicating my form to have a new one that has never been cached) but nothing works.
And I didn’t find a way to exclude my pop up and / or the form from caching so I’ve had to exclude all pages from the site from caching. Which is like not having a caching plugin at all. I asked the support but no answer so far.
I thought I’d share this for people who could be facing the save issue, and save them a few hours trying to debbug like I did.
Johnny
Try using the CSS exclude feature in the pro version of Swift and that should do it.
Alexis
I’ll look into that thanks !
Diego
Hi Johnny! thanks for the excelent tutorial! Please would you add more information or complement this guide about this topic: Plugin Organizer… And one question: Do yo know if Swift works with Asset CleanUp? Thanks
Johnny
I don’t recommend plugin organizers to non-professionals. So messy and you often break things. The only way to know about something is to try yourself. Every site is different.
Glan Smith
Hey Johnny,
Thanks for sharing this!
I will surely try this on my site.
Philip Zammit
Thanks this was helpful although seems like gtmetrix has changed some things and this might need an update 😉
ignatios
Hello Johnny! You you are definitely a Wp_Star & wp speed deamon also.
Simply you are the best!
This post is more than excellent!
The best ever wp analytic post generally that i have ever read.
Also Sf is superb, miles away for others.
Keep on show us the right wp speed way.
Greetings from Athens
Johnny
Thank you, ignatios!
L F Clark
Hello,
very useful article. used it to up swift. works great.
I have a question about the plugin settings. I have a woocommerce store on my site and I would like to prevent swift from caching single product pages while allowing woocommerce category pages and wordpress pages and posts to be cached. is this possible?
Thanks
Johnny
Off the top of my head right now, I’m not really sure if it’s easy to exclude all single product pages in one click instead of manually listing out each URL. Sorry I couldn’t be more helpful. I’m traveling right now and saving my time only focusing on client work.
Jenn Lee
Hi Johnny and friends,
Thanks for the great guide. I am Swift Performance Pro Lifetime user. I use it on majority of my client’s woocommerce site. So far working well.
But recently I am facing one problem on all my client’s woocommerce sites.
Evey time customer logged in, If they navigate to home page (root path), the cache still enabled and that’s why the Login/Register link in homepage not showing My account wording.
But all of other pages working well which it’s skipped the cache.
And to resolve the “homepage keep caching” problem, I as the visitor need to refresh the homepage manually then the cache will gone.
I tested it in firefox private browser and also chrome incognito mode but the result still the same. I am using Nginx and I double checked the Rules were copied correctly with no error from server side.
Not sure what’s going on and hopefully someone facing the same problem as me.
I have not raise a ticket to Swift Performance Support yet because I hope this is a simple solution maybe I configured something wrong…
Jenn Lee
OK, after spent half day on troubleshooting, noticed that once enable swift performance, the html type response will be cached by browser(Browser Cached).
1) Once a new visitor visited my site before go to login, their browser will cached the html version once.
2) Once logged in, if the visitor revisit the pages before, now their request totally not send to server but served from their browser cache….
Now I am checking what’s going on with my nginx server.
Temporary solution is add below nginx script in my location / block.
location /
{
add_header Cache-Control ‘no-cache’;
try_files $uri $uri/ /index.php?$args;
}
After this, every time i visit my site, the main html response will not be cached.. The other static resources still obeying the cache setting configured previously.
Hope this can help someone who face the same problem as me.
Johnny
Hmmm…there might be several caching mechanisms going on or a plugin conflict. That’s all I can guess without seeing it for myself.
Arun
Hi Johnny,
I am using SP pro, but I get different results when I load just the domain name mydomain.com and mydomain.com/page. It shows 2 different results and page wise speed test is giving very low rating (below 50). Do you have any idea how SP can fix page wise optimization.
I followed your above instructions but still I am facing the same issue.
No response from SP support
Johnny
You’ll have to share your site urls on my FB group if you want people to jump in with ideas.
Ian B
Hey Johnny – amazing guide!
Do you use Swift on your Memberpress sites? Assume you need to configure differently to avoid one member being shown cached content from another.
Cheers
– Ian
Johnny
I don’t cache logged-in users. Swift can be on used on MemberPress sites. Just make sure you exclude necessary pages and what not.
Ian B
Cool – thanks. So just set it not to cache logged in users and exclude any membership specific pages.
Danusyakti
New Swift Performance so complex to configure. But they are now unlock some pro features for free and i really like it.
Khampol V
Totally agree with this post. Only one thing : their service custom for the plugin is how to say… Complicate… I did not have so good experience about it.
Moin Davis
Is this plugin best for Avada theme?
carmen chan
Hi there,
In my google page insights, the top opportunity there was to reduce unused CSS. but upon checking, the url stated was from Swift (here is how most of them looks like when i tested on multiple pages – https://www.ceriasihat.com/wp-content/cache/swift-performance/www.ceriasihat.com/css/127f35931ef55eb80ac6a765682078c7.css)
How do I remove these unused CSS?
Thanks
Johnny
Ack, that’s a problem. You’ll need someone to check your settings and diagnose.
rami
Is this plugin best for Avada theme?
John Jaccob
GoWebP Image Optimization plugin is also the easiest way to quickly reduce image size.
andora
how to make cron auto rebuild?
Anna
To set up cron for auto-rebuild in Swift Performance, you can create a cron job on your server to trigger the cache rebuild at regular intervals. If you’re using cPanel, you can go to the ‘Cron Jobs’ section and set a command to run something like wget -q -O – https://yourwebsite.com/?swp_cache_rebuild at your desired frequency. Make sure to replace the URL with your actual site. Depending on your hosting environment, the exact command might vary, so check with your provider for specifics!