UltraStack Utilities With InMotion Central

Learn About the UltraStack Utilities With InMotion Central

Your InMotion Central production site will have the ability to use NGINX caching, this can result in faster website performance since it does not have to generate content in real-time. You can select from pre-configured profiles that are built for specific types of websites. Then you can set your purge settings using a plugin such as NGINX Helper or W3 Total Cache.

This ensures your visitors are seeing the latest version of your website and not old cached content. In this guide, we’ll go over the UltraStack Utilities that are available on your server to help you manage your cache settings via SSH. Then we’ll show you how to select your caching profile and manage your cache settings using NGINX Helper and W3 Total Cache.

Cache Profile Options

Below is a breakdown of the available profile options that you can choose from.

ProfileSSH CommandDescription
No Cachingno_cachingTurns caching off but you will still have static content acceleration and brute force rate-limit protection running.
WordPresswordpressGeneral-purpose profile compatible with most WordPress and WooCommerce site, but it is recommended to use a cache-control plugin such as W3 Total Cache to handle purging (clearing) the cache when content is updated.
WordPress Multisitewordpress_multisiteThis is the same as the WordPress profile but built specifically for Multisites (Networks) but allows Apache to perform required path rewrites by disabling Accelerate Static ContentNote: This is the best option to use with W3 Total Cache, because it would allow minify and concatenate functions to work appropriately and you can set the page cache to store on disk, which would serve it from NGINX cache directly before reaching the application level on request.
WordPress Microcachewordpress_microcacheRecommended for sites where full page caching is not a good option due to the dynamic nature. This can help neutralize high increases in traffic to your site.
Pass Allpass_allSelect this to pass all traffic to Apache in case you do not want to utilize any caching, ratelimit protection, or optimizations. We recommend using the No Caching profile instead if you want to disable caching.
Honor Headershonor_headersAs per InMotion Central, this profile “Honors the Cache, Expires, and X-Accel-Expires headers set by the application. If not set, a default 60 second expiration time is used. All other values match the WordPress/Generic profile.” Note: This can be used with Total Cache effectively as well, because it allows you to modify or customize the response headers to control cache on the client-side, server, and CDN levels.

Set Your Caching Profile

Set Caching Profile From InMotion Central

InMotion Central includes pre-configured NGINX profiles that are custom-made for specific website needs. Here are the steps to easily select the one that best suits the type of site you are building.

  1. Login to InMotion Central.
  2. Roll your mouse over the project you want to manage and click The Bridge button.
    Accessing The Bridge
  3. Click Environment and select the one that is associated with your server.
    Selecting Server Environment
  4. Click the Manage Server link in the navigation menu.
    Accessing the Server Management Page
  5. Click NGINX Settings.
    Access Server NGINX Settings
  6. You will then see a list of the available NGINX profiles, for more information see the section above on Cache Profile Options. Select the one you want to use then click the Update Profile button.
    Update NGINX Profile Settings
  7. Click the Update Profile button to save your NGINX settings. The playbook will then run and setup the new NGINX profile for your server.

Set Caching Profile With SSH

Connect to your server via SSH and run the following command to select your caching profile. For more information see the section above on Cache Profile Options.

usutil -u USER -d DOMAIN -p PROFILE

Example:

usutil -u root -d https://example.com -p wordpress_multisite

Managing Cache From the WordPress Dashboard

Now that you have your NGINX profile selected you can manage your cache using a WordPress plugin. NGINX Helper will be installed automatically but for more control, we recommend using W3 Total Cache. We’ll now go over how to use both plugins to manage your cache-purging settings.

In this section, we’ll show you how to manage your cache from your WordPress Dashboard using the NGINX Helper and W3 Total Cache plugins.

Using NGINX Helper

NGINX Helper will automatically be installed on your site, so you just need to access and choose your purge settings.

  1. Login to InMotion Central.
  2. Roll your mouse over the project you want to manage and click The Bridge button.
  3. If you have multiple environments, you may have to click Environment and select the one that you are working with.
  4. Click the WP Admin link in the navigation menu to access your WordPress Dashboard.
    Accessing WP-Admin From InMotion Central
  5. Click Settings then NGINX Helper.
    Accessing NGINX Helper
  6. Check the box to Enable Purge.
    Enabling Purge With NGINX Helper
  7. You can then select your Purging Conditions as needed.
    NGINX Purging Conditions
  8. Click the Save All Changes button after choosing your settings.

Using W3 Total Cache

W3 Total cache can be easily installed right from InMotion Central, then you can manage your cache directly from your WordPress Dashboard.

  1. Login to InMotion Central.
  2. Roll your mouse over the project you want to manage and click The Bridge button.
  3. If you have multiple environments, you may have to click Environment and select the one that you are working with.
  4. Click Optimize then Page Speed in the navigation menu.
  5. Click the Open Dashboard button to visit the Performance page in your WordPress Dashboard.
    Open Dashboard to Access W3 Total Cache
  6. Once logged into your Dashboard I recommend clicking the Setup Guide link in the Performance section. It will walk you through testing and the initial setup process.
    Accessing the W3 Total Cache Setup Guide

Managing Cache With SSH

If you prefer to use SSH instead of a plugin to manage your cache, you have the ability to clear all cached data or just a single page.

Purge All Cached data

usutil --purgeall -Z

Purge Cache For a Specific page

usutil --purge -X http://example.com/page/

Stats & Reporting

Show cache stats [default]

usutil --stats -S

View Server Stats

Run the following command to view information about your server since it was last restarted.

Troubleshooting With –info

Run the following command to run a list of requests to help check the status of your cache.

usutil --info -I https://example.com

The above command will perform the following checks

  • Make a request to the target URL and check the response status
  • Calculates the total request time
  • Checks the X-Proxy-Cache header
  • Checks for a matching cache object in the user’s cache zone. If it exists, checks the cache expiration time and validity
  • Compares the target URI against the domain’s ngxconf config, then displays any matching rules
  • Determines if a page is considered ‘static content’, and whether it was served from NGINX or Apache
  • Displays Location redirects
  • Checks compression and content encoding
  • Checks for presence of the Vary header
  • Checks for presence of any cookies, then displays them
  • Displays which cache control headers are being trusted, according to the domain’s ngxconf config
  • Checks for the presence of the Upgrade header
  • Checks if Apache mod_http2 is installed and in use with NGINX
  • Checks the status of Apache, NGINX, and the associated PHP-FPM master
  • Parses and displays corresponding lines from the Apache, NGINX, and PHP-FPM error logs

Congratulations! Now you know how to select your caching profile and manage your cache settings using NGINX Helper, W3 Total Cache, and SSH.

JB
John-Paul Briones Content Writer II

John-Paul is an Electronics Engineer that spent most of his career in IT. He has been a Technical Writer for InMotion since 2013.

More Articles by John-Paul

Comments

It looks like this article doesn't have any comments yet - you can be the first. If you have any comments or questions, start the conversation!

Was this article helpful? Let us know!