What is a site specific plugin?
A site specific plugin is WordPress plugin, created for a specific website. It can store any number of functions related to a specific website, and generally affects the content or functionality of a website to make it unique without affecting the theme.
For example a site specific plugin would be appropriate for:
- custom post types, or unique content;
- unique user roles, permissions, or administration menus;
- custom shortcodes, styles, or links;
As a general rule, if a custom function affects the look and feel of a website, it should be stored in the theme (or child theme) functions.php file, while any functionality of the website which should remain if a theme is accidentally deactivated, should be placed in a site specific plugin file.
How to create a site specific plugin file
Creating a site specific plugin file is identical to the process of creating a regular plugin file for WordPress, the only difference is in the application of the code, because unlike a traditional WordPress plugin this specific plugin will only be activated on a specific site.
Creating an industry, market, or host specific plugin file
Another excellent use of the site specific plugin file concept is for web design agencies to create task specific plugin files for a variety of websites. While a site specific plugin file is used specifically for an individual site, expanding on this concept would be ideal for web studios to offer:
- client specific plugin files, with unique code for a group of client web pages;
- host specific plugin files, hosting code to make the most of a unique hosting environment;
- industry and market plugin files, for functions common to a specific type of client (ie realtor or retail);
- agency specific plugin files, for resources a web company wants to include in all client sites;
While the application of a site specific plugin file is extremely unique, these plugin files could easily facilitate code across a variety of websites managed by a single organization. Best of all, if combined with an auto update from private GitHub repositories, client websites could automatically receive updates from a single code update.
You can learn about making a site specific plugin file from a variety of sources including: