Submit & Publish Your Plugin on WordPress.org
PRO TIP: Keep your plugin name short and sweet and verify it’s not already in use by searching the plugin directory.
Step 1. Submit your plugin to WordPress.org
The first step is obviously submitting your plugin for approval. This process is fairly easy & normally takes 1-10 days to get approved. Get started by zipping up your plugin files, log into WordPress.org, then submit your plugin for approval here:
Step 2. Add plugin files to your SVN repository
Once approved, you’ll need to upload the plugin files to your SVN repository listed in the approval email. Looks something like this: https://plugins.svn.wordpress.org/plugin-name
First, create a local directory on your machine to house a copy of the SVN repository:
Next, check out the pre-built repository:
svn co https://plugins.svn.wordpress.org/plugin-name plugin-name
Did you receive this SVN error?
svn: error: Failed to locate 'svn'. svn: error: The subversion command line tools are no longer provided by Xcode.]p>This is because Apple deprecated SVN in Xcode 11 (macOS Catalina 10.15 release). You can fix this by installing SVN via homebrew.
brew install svn
Navigate into the
Now you can add your plugin files to the
trunk/ directory of your local copy of the repository using copy/paste commands via command line, or dragging and dropping.
WARNING: Do not put your main plugin file in a subfolder of trunk, like
/trunk/plugin-name/plugin-name.php as that will break downloads. Use subfolders for included files.
Once your files are in the trunk folder, you must let subversion know you want to add those new files back into the central repository:
svn add trunk/*
Step 3. Publish your plugin on WordPress.org
After you add all your files, you’ll check in the changes back to the central repository:
svn ci -m 'Initial release version of the plugin'
NOTE: It’s required to include a commit message for all checkins.
Did your commit fail due to ‘Access forbidden’? Try adding your username and password to the check-in command.[shell]svn ci -m ‘Initial release version of the plugin’ –username your_username –password your_password [/shell]
Creating/Updating Plugin Assets
assets folder in your plugin is where you can store images (like plugin headers, icons, and screenshots) used on your plugin’s display page.
All files should be placed into the
assets directory of your SVN directory and will work for all versions of your plugin. This is a top level directory, just like
Do not place plugin assets like screenshots, plugin headers, icons, etc. into
NOTE: All images are served through a CDN and cached heavily, so it may take a some time to update when changed or added. It should only take a few minutes, but 6 hours is not unheard of when the servers are under high load (like the week before and during a release of a major version of WordPress).
Plugin Banner Image Sizes
All plugin banner images should be created as a
.png. Here’s a list of the filenames & sizes that can be uploaded:
assets/banner-772x250— Normal banner
assets/banner-772x250-rtl— Normal banner (right-to-left)
assets/banner-1544x500— High-DPI banner (retina)
assets/banner-1544x500-rtl— High-DPI banner (retina, right-to-left)
Plugin Icon Image Sizes
In addition to JPG and PNG formats, you can also use SVG. Vectors are perfect for icons, as they can be scaled to any size and the file itself is small. If you chose to use SVGs, you must also use a PNG icon as a fallback, otherwise your plugin icon will not display properly in older browsers or on Facebook.
If you do not upload an icon, one will be auto-generated for you.
assets/icon-128x128.(jpg|png)— Normal icon
assets/icon-256x256.(jpg|png)— High-DPI icon (retina)
assets/icon.svg— SVG icon (preferred)
Screenshots show on the main page of your plugin, and are used to illustrate aspects of the plugin admin dashboard or live examples.
There should be one screenshot description for every line in your
readme.txt file & updated to the repository
assets directory. The content of the lines will become the captions of the screenshots on your plugin’s page.
== Screenshots == 1. This a the first screenshot description for this plugin 2. This is the second screenshot description for this plugin
IMPORTANT: All plugin screenshot filenames should be lowercase; uppercase names won’t work.
Editing Published Plugin Files
Once your plugin is in the directory, you will likely need to edit the code at some point, whether that’s to fix bugs or add new features.
Step 1. Make sure your local version is up-to-date.
First, go into your local copy of the repository and make sure it’s up to date:
If changes have been made in the central repository, they’ll be downloaded and merged into your local copy.
Step 2. Edit plugin files.
Now that your local repo is updated, you can edit or add files in your plugin.
Once you’re done, you can check to see what’s different between your local copy and the central repository. First, check the status of the local copy:
This will tell you what files have been modified (M) and added. You can check the differences to make sure everything looks right:
New files will be marked with a question mark (?) & will not be automatically added unless specified. To add new files:
svn add [directory/file-name]
Step 3. Publish the updated plugin files.
If everything looks good then you can check in your changes to the central repository.
svn ci -m "Fixed some bugs & added some new features"
Now you’ve successfully updated trunk on the central repository. Last step is to tag the new version.
Step 4. Tag the new version.
When you’re ready to publish a new version of your plugin, you’ll need to ‘tag’ a new release. This lets your users easily grab the latest (or an older) version, helps you keep track of changes more easily and lets the WordPress.org Plugin Directory know what version of your plugin it should tell people to download.
First copy your code to a subdirectory in the
tags/ directory. For the sake of the WordPress.org plugin browser, the new subdirectory should always look like a version number.
188.8.131.52 is good.
You’ll want to use
svn cp instead of the regular
cp in order to take advantage of SVN’s features.
svn cp trunk tags/2.0
Next, check in the changes:
svn ci -m "tagging version 2.0"
Alternately, you can use http URLs to copy, and save yourself bandwidth:
svn cp https://plugins.svn.wordpress.org/plugin-name/trunk https://plugins.svn.wordpress.org/plugin-name/tags/2.0
Doing that will perform the copy remotely instead of copying everything locally and uploading. This can be beneficial if your plugin is larger.
DON’T FORGET: After tagging a new version, update the Stable Tag field in