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

  • 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
  • Preloaded Scripts not used within a few seconds

    If you can see a console message about the preloaded scripts are not used within a few seconds from the window’s load event, it is a false positive warning, you can simply ignore it.

    Swift Performance is using a unique technique to load async javascripts, which is not recognized by Google Chrome, that because you can see this message.

  • 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]