How to Create a Site Specific Plugin

Sometimes we provide you with little snippets of code to add or change a feature of one of our themes or plugins. The best way to implement those changes when they deal with PHP code is to create a Site Specific Plugin. These are plugins that never really update (unless you change the code) but just contain little pieces of code to do small tasks.

In this tutorial, we'll show you how to create a site-specific plugin without even using FTP or our touching code (other than the code you need to paste!).

Manually create a site-specific plugin

Create a new folder on your Desktop and name it after your website.
Open a plain text editor, like Notepad or TextEdit.
Create a new file and save it as {name_of_website}.php in your previously created folder.

Paste the specific header code in the file so WordPress can recognize it as a plugin.
Plugin Name: Site Plugin for
Description: Site specific code changes for
/* Start Adding Functions Below this Line */
/* Stop Adding Functions Below this Line */

You can replace the name with your own domain name.

The next step is to upload this site-specific plugin to WordPress. Select the folder and compress it.

Go to Plugins > Add New and upload the site-specific plugin archive.
Click on Install and then Activate.

That's it! You have installed the site-specific plugin.

Using the Pluginception plugin

Install the Pluginception plugin:
Select Create a New Plugin under the plugin menu options

Fill out the plugin options, be sure to include the word Site Specific in the title so any other WordPress webmaster debugging your website will know that the plugin is a custom one.

Click Create a blank plugin and activate it!

The page will automatically be redirected to the plugin edit screen. You might get a message like the one below; simply click I understand.

Paste the code snippet you received from our doc into the edit area and click Update File. Notice the activation status at the top next to the plugin file path. If it says inactive, you need to activate the plugin from your plugins area after updating the file.

That's it! You should now have a site-specific plugin with the modification from our doc without having to create a child theme or log into your site via FTP.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us