Frequently Asked Questions

  • High CPU Usage

    Usually it happens on small VPS, or limited shared hosting, when CPU is limited by the hosting provider.

    To avoid it you should do the following steps:

    • Enable Compute API
    • Enable Prebuild Booster

    These options will speed up optimizing process, and also will decrease CPU usage.

    If your site is running on shared hosting they usually limits the CPU usage (CPU time). That means they won’t let you use the shared CPU all the time.

    100% CPU usage is temporary, it happens while Swift generates the cache, but once it is generated CPU usage will be about 0%.

    However there is an easy solution to keep CPU usage under the limit, you can limit Prebuild speed. If you set it to Moderate or Reduced the plugin will wait a bit between preloading pages, it will decrease the CPU usage.

    You can configure it in Settings > Caching > Warmup > Prebuild speed.

  • Elementor animations or dropdown menu are not working

    If Merge Scripts and Async Execute is enabled, and Elementor animations are not working, or some elements are simply missing, you will probably need to exclude webpack.runtime.min.js from merging in order to work.

    To exclude it in both Elementor and Elementor Pro add the following to Exclude Scripts:

    webpack(-pro)?\.runtime\.min\.js

  • Strange Redirects

    If you have strange URLs in your analytics or you can see that the site redirects to an URL like this:
    https://www.yoursite.com/wp-content/cache/yoursite.com/desktop/unauthenticated/index.html

    This is probably caused by an improper order of htaccess rules. Probably you are using a force SSL or force www/non-www rule in .htaccess. Please remove these rules from .htaccess, and insert them in

    Settings » General » Tweaks » Custom Htaccess

    Some examples

    # Redirect non-www to (ssl) www
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^example\.com [NC]
    RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301]
    # Redirect non-SSL to SSL
    RewriteCond %{HTTPS} !on
    RewriteCond %{SERVER_PORT} !^443$
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
    
    # Redirect www to non-www
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www.example\.com [NC]
    RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
    
  • Cache size

    The average size of a cached page should be about 200-400Kb. That means if you have 1.000 pages the normal cache size will be about 200-400 Mb.

    If cache size is larger than normal, it usually happens if there are a very large number of pages or if there is a dynamic part in JS or CSS – some themes/plugins creates dynamic javascripts and that is why the folder is filled up.

    Clear all cache, then do the following steps:

    1.) Enable Separate Styles and Separate Scripts in Optimization settings:
    2.) Exclude unnecessary post types: autoconfig should find most and exclude them automatically but you can add them manually: Settings > Caching > Exceptions> Exclude Post Types

  • Missing Images

    If images are not loaded, usually it is a conflict with lazyloading.

    If you are using any other lazyloading, you should disable it, or disable it in Swift Performance settings: Media » Images » Lazyload Images

    Regarding that 3rd party lazyloading may can conflict with Merge scripts and Async Execute features as well, it is recommended to use Swift Performance built in lazyloading.

  • FastCGI/Nginx cache and Redis support
    Swift Performance supports Nginx Helper. If you install and configure Nginx Helper properly, Swift will clear Nginx/FastCGI and Redis when it is necessary