Skip to content

retlehs/kinsta-mu-plugins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kinsta Must Use (MU) Plugin

A simple mirror of the official Kinsta Mu Plugin with added Composer/Bedrock support.

For latest version/info please see the official Kinsta MU Plugin page.

Installing with Composer (for Bedrock)

  1. Add this plugin repo to repositoriesin your Bedrock composer.json file:
      "repositories": {
        "wpackagist": {
          "type": "composer",
          "url": "https://wpackagist.org",
          "only": [
            "wpackagist-plugin/*",
            "wpackagist-theme/*"
          ]
        },
    +   "kinsta-mu-plugins": {
    +     "type": "vcs",
    +     "url": "git@github.com:retlehs/kinsta-mu-plugins"
    +   },
  2. Add the plugin requirement with specific version number (or * for latest) to composer.json:
      "require": {
        "php": ">=7.4",
        "composer/installers": "^2.0",
        ...
    +   "kinsta/kinsta-mu-plugins": "*",
        ...
      }
  3. Run composer update from the Bedrock directory.

White label

Enabling white labeling will change the following elements in the WordPress dashboard:

  1. The branded Kinsta Cache sidebar link will be changed to an unbranded Cache Settings link.
  2. The Thanks for creating with WordPress and hosting with Kinsta message near the bottom of the dashboard will be replaced with Thank you for creating with WordPress.
  3. The Kinsta logo on the Cache Control page will be removed or replaced with an image of your choice.
  4. The links to Kinsta documentation and support will be removed.
define('KINSTAMU_WHITELABEL', true);
define('KINSTAMU_LOGO', 'https://mylogo.com/mylogo.jpg');

For more info, refer to the official docs here

Bedrock + Kinsta

The following constants may be required to fix issues with CDN paths + shared plugin asset URLs.

/**
 * Kinsta CDN fix for Bedrock
 */
define('KINSTA_CDN_USERDIRS', 'app');

/**
 * Fix Kinsta MU Plugins URL path with Bedrock
 */
$mu_plugins_url = Config::get('WP_CONTENT_URL') . '/mu-plugins';
define('KINSTAMU_CUSTOM_MUPLUGIN_URL', "{$mu_plugins_url}/kinsta-mu-plugins");

Changelog

https://kinsta.com/changelog/mu-plugin-changelog/