HOME » Documents » KUSANAGI-Specific Plugins

KUSANAGI-Specific Plugins

About KUSANAGI-Specific Plugins

KUSANAGI comes with built in KUSANAGI Plugins which are already enabled.
These "KUSANAGI's-Specific Plugins" provide acceleration-related functions such as page cache and translation accelerator, there is also a function to switch themes according to the type of device.

Overview of Functions

Page Cache

Page Cache is a function that saves displayed HTML as temporary data for a certain period of time and reuses it to improve page display speed.
The page cache function uses "bcache", which is a cache function built into WordPress.
For more information on "bcache" and how to use it with KUSANAGI, please refer to the following.

The "kusanagi bcache" command and how it works - KUSANAGI Tech Column

Device Theme Switcher

Device Theme Switcher is a function to optimize display by changing the theme displayed on mobile devices such as smartphones and tablets.
In addition, even if the cache function is enabled, it can switch and display the theme correctly for each device.

Translate Accelerator

Translate Accelerator speeds up loading by stopping the translation of multi-language WordPress, plugins, themes, etc., or caches translation data to speed up the translation process and reduce execution time required to display the translation.

Automatic Updates

Automatic Updates of WordPress, plugins, themes, and translation data can be turned on or off.

Image Optimizer

Image Optimizer can reduce image size and speed up display by adjusting the quality of jpeg files and limiting the max-width of images when uploading media.

Replacing

Replacing allows you to dynamically replace the string displayed in WordPress using specified rules.

Performance Viewer

Performance Viewer shows the run speed of WordPress and the number of queries in the admin bar.
The background color of performance display will change depending on the numbers. You can turn the display on / off in the settings screen.

Optimizing "wp-settings.php"

Optimizing "wp-settings.php" is a function that can speed up processing.
The "wp-includes" mechanism pre-loads the following code.
This is an advanced feature and should only be used by those who clearly understand how PHP's "opcache" functions.

Theme Accelerator

Theme Accelerator is a feature that speeds up the back-end processing of a website, allowing themes to load faster.
For more information on the Theme Accelerator, please refer to the following.

Introduction to KUSANAGI Plugins "Theme Accelerator" - KUSANAGI Tech Column

How to Use KUSANAGI-Specific Plugins

Click "KUSANAGI" on the menu of the WP Admin Dashboard to see "KUSNAGI Settings". From KUSANAGI Settings you can control the settings for each function.

KUSANAGI Settings

Page Cache Settings

By default, the cache (bcache) is disabled.

To enable it, log in to the virtual machine via SSH, switch to the root user, and run the following command.

  • For KUSANAGI 9
# kusanagi bcache on [profile]

* For [profile], specify the KUSANAGI profile name to enable the bcache

  • For KUSANAGI 8
# kusanagi target [profile]
# kusanagi bcache on

* For [profile], specify the KUSANAGI profile name to enable the bcache.

Page Cache
  1. Cache TTL
    You can set the cache time (TTL) for the front page, archive (list), and each article.
  2. Cache excluded URL
    You can set which URLs are to be excluded from the page cache.
    Note that cache is disabled by default under the "wp-admin" directory.
  3. Query string to cache
    You can set a query string to enable caching.
    WordPress default queries are preset, so no registration is required.
  4. Range of cache to delete when publishing articles
    You can set the range of cache to be deleted as soon as you publish an article.
    This is useful, for example, when you want to display newer posts on your top page.
  5. Clear Cache
    Deletes all the cache generated so far.
    Please note that if the site is frequently accessed, the server load may temporarily increase after clearing the cache.
  6. Regeneration of "advanded-cache.php"
    Be sure to click this button and regenerate this file when you start using cache or if you change the cache settings in 1 to 4 above.
  7. Save Changes
    Save to apply your changes.

Device Theme Switcher

Device Theme Switcher
  1. Disable Theme Switcher by device
    Check or un-check to enable or disable the device switching function.
    By default, theme switching is disabled.
  2. Group
    Set which theme is to be used for the devices registered in each group.
    By default, "Smartphone" and "Tablet" are already registered, and "Theme to be used for access from Smartphones" and "Theme to be used for access from Tablets" can be set.
  3. Device
    For each device, you can register a group to which it belongs.
    Common devices are set by default and in most cases, there is no need to change them.

Translate Accelerator Settings

Translate Accelerator
  1. Enable Translate Accelerator
    Check the box to enable "Translate Accelerator".
    Un-check the box to disable "Translate Accelerator".
  2. Type
    Allows you to set the cache type.
    The default is APC, and usually there is no need to change it.
  3. Translated text displayed in your site
    This setting allows you to speed up the translated text displayed on your site.
    The default setting is "Disable translation".
    If you are using a theme with no translation, you do not need to change this setting.
  4. Login/signup page translation
    Configure the settings to speed up the login/signup pages.
    The default setting is "Enable cache".
    If you are using a theme with no translation, you do not need to change this setting.
  5. Admin pages Translation
    Configure settings to speed up the admin page.
    The default setting is "Enable cache".
    If you are using a theme with no translation, you do not need to change this setting.
  6. Delete cache
    Clears the cache.
    If you have changed the cache settings, click this button "Force deletion of all cache" to clear the cache.
  7. Save Changes
    Save to apply your changes.

Settings for Automatic Updates

To enable automatic updates, you will need to adjust the FTP settings in "wp-config.php".
There are several FTP settings in "wp-config.php", but they can usually be left as they are, except FTP_PASS.
To set FTP_PASS, first remove the # at the beginning of the line if there is one.
Next, put the password of the "kusanagi" user specified when executing "kusanagi init" in the '*****' line and save it.

define('FTP_HOST', 'localhost');
define('FTP_USER', 'kusanagi');
#define('FTP_PASS', '*****');  # delete # at the beginning of the line, change ***** to kusanagi user password and save
Automatic Updates
  1. Translations
    Enable or disable Automatic Updates of translation data.
    The default setting is "Enable".
  2. Plugins
    Automatic Updates for plugins can be set as shown below.
    - Disable all: Disable automatic updates for all plugins.
    - Set individually: Set the automatic update settings for each plugin via the plugin settings on WordPress.
    - Enable all: Enable automatic updates for all plugins.
    The default is "Disable all".
  3. Themes
    Automatic Updates for themes can be set as shown below.
    - Disable all: Disable automatic updates for all themes.
    - Set individually: Set the automatic update settings for each theme via the theme settings on WordPress.
    - Enable all: Enable automatic updates for all themes.
    The default is "Disable all".
  4. WordPress core
    Automatic Updates for WordPress can be set as shown below.
    - Disable all: Disable automatic updates for all WordPress core.
    - Enable minor updates: Enable automatic updates of WordPress core for minor versions only.
    - Enable major updates: Enable automatic updates of WordPress core for both minor and major versions.
    The default is "Enable minor updates".
  5. Automatic update schedule
    Check the box for "Enable schedule settings" to enable the settings for the automatic update schedule.
    If you un-check the box for "Enable schedule settings", the automatic update schedule will be disabled and automatic updates will be performed with the default schedule.
    If the schedule settings are enabled, you can set a schedule by the day of the week and the time to automatically update.
  6. Save Changes
    Save to apply your changes.
  7. Automatic update status of themes and plugins in use
    Displays the names and types of themes and plugins currently enabled in WordPress, and their "Automatic Update" settings.

Misc. Settings

Various other features are available, such as image optimization, replacements, theme accelerators, and more.

Common Features

Common Features

For the following settings, click the "Save Changes" button at the bottom of the screen to save and apply the changes.

Image Optimizer Settings

Image optimizer
  1. Enable Image Optimizer
    Check the box to enable image optimizer
    Un-check the box to disable image optimizer.
  2. Jpeg quality
    A value 0-100 can be set with the slider.
  3. Maximum full image width
    You can specify in pixels the maximum width of the image.
    The default value is 1280px and the minimum value is 320px.

Replacing Settings

  1. Replacing at login/signup page
    Turns on and off replacements to be applied to the login/signup screen.
  2. Replacement String
    Set the target string and replacement string.
    Click the "Add New Rule" button to add a new replacement rule.
    Click the "Delete Rule" button to delete the replacement rule in that row.

Performance Viewer Settings

Performance Viewer
  1. Display performance on the admin-bar
    Check the enable box to display performance on the admin-bar.
    If left un-checked, performance will not be displayed on the admin-bar.
  2. Required capability to display performance
    You can select capabilities to view performance.

Optimize "wp-settings.php" Settings

*This is an advanced feature and should only be used by those who clearly understand how PHP's "opcache" functions.

Optimize "wp-settings.php"
  1. Optimize "wp-settings.php"
    Check the box to enable optimization of "wp-settings.php".
    Un-check the box to disable optimization of "wp-settings.php".

Theme Accelerator Settings

Theme Accelerator
  1. Enable Theme Accelerator
    Check the box to enable theme accelerator.
    Un-check the box to disable theme accelerator.