Publishing a WordPress Plugin to Plugin Directory
This article is intended to serve simply as a personal reminder on how to use the Tortoise SVN, an Apache™ Subversion (SVN)® client, to publish and maintain my officially listed WordPress Plugins: Carbon Copy, WP Imsizer, WPFrom Email, CSS Ready Classes for Gravity Forms.
Video on How to Publish and Manage WordPress Plugin using Tortoise SVN
Installing Tortoise SVN
Begin by downloading Tortoise SVN and installing it. For features, I went with the Additional icon sets, Register diff/patch files, and just the English dictionary.
Be sure to reboot your PC after installing Tortoise SVN to get the folder and file icons to properly inform you on the synchronization status.
Connecting to the WordPress Subversion Repository
Now that Tortoise is installed, access the directory on your PC in which you want to have your plugin repository downloaded to. Once inside the desired folder, right click within the folder window and select “SVN Checkout…“
Insert your WordPress Plugin Repository URL (the one provided to you via email when you initially submitted your WordPress plugin for approval). In my case: https://plugins.svn.wordpress.org/carbon-copy
If your “Checkout directory” does not default to the folder you right clicked within enter the destination directory and then click “OK“.
After the checkout process completes, you can view your newly downloaded folder within the Checkout directory you specified above.
All your WordPress plugin files will be centrally stored on the WordPress SVN repository servers. From that repository, anyone can “checkout” (download) a copy of your plugin files onto their local machine. So be careful what you upload!
Publish or Update a WordPress Plugin
When you are ready, right click on the file(s) or folder(s) that need to be committed (uploaded) to the SVN repository.
When attempting to commit a new version of your plugin to the “tag” directory you may receive an additional prompt wanting your confirmation that you are committing to a tag.
Only the assigned plugin author has the authority to check files in using their WordPress.org account login credentials. You may add, edit and delete files from your local machine and upload those changes back to the central WordPress SVN server. It’s this process of checking in that updates both the files in the repository and also the information displayed in the WordPress.org Plugin Directory. NOTE: Your WordPress.org username is case sensitive, if you don’t enter it in correctly your connection to the SVN will fail.
Unlike GitHub, the WordPress SVN is meant to be a release system, not a development system. You don’t need to commit and push every small change, and in fact doing so is detrimental to the system. Every time you push code to SVN, it rebuilds all your zip files for all versions in SVN. This is why sometimes your plugin updates don’t show for up to 6 hours. Instead, you should push one time, when you’re ready to go.
Do not put your main plugin file in a subfolder within the “trunk” directory. For example, /trunk/my-plugin/my-plugin.php as doing so will break the “Download” feature for your plugin. You may use subfolders for included files but not for your main plugin file.
The “trunk” directory is for the development version of your plugin. It is recommend that you keep the trunk folder up to date with your code for easy SVN compares.
The “tags” directory is where you put your versions of the plugin. You will use the same version numbers for the sub-directories here as you do for your plugin versioning. It is important that you always use tag folders and proper versioning to ensure your users get the correct code. Version 1.0 of the plugin will be in /tags/1.0, version 1.1 would be in /tags/1.1, and so forth.
The “branches” directory is a place that you can use to store branches of the plugin. Perhaps versions that are in development, or test code, etc. The WordPress.org system does not use the branches directory for anything at all, it’s considered to be strictly for developers to use as they need it.
The “assets” directory is where your plugin header images, and icons reside. It is also recommended, but not required, to put your screenshot files in /assets. Also all images are served through a CDN and cached heavily, so it may take a some time to update when changed or added. The following assets are pulled for use on the WordPress.org Plugin Directory listing for your plugin.
- Normal Banner: banner-772×250.(jpg|png)
- Normal Banner (RTL): banner-772×250-rtl.(jpg|png)
- High-DPI (Retina): banner-1544×500.(jpg|png)
- High-DPI (Retina RTL): banner-1544×500-rtl.(jpg|png)
If RTL images are available, then they will be displayed on plugin pages in languages that use RTL.
Plugin icons are square images that show on the side of the plugin in searches on WordPress.org but also on the back-end of WordPress.org. In addition to JPG and PNG formats, you may 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 use an icon, an auto-generated one will be made for you.
- Normal: icon-128×128.(png|jpg)
- High-DPI (Retina): icon-256×256.(png|jpg)
- SVG: icon.svg
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 for every line in your readme.txt file. The content of the lines will become the captions of the screenshots on your plugin’s page. Screenshots must be local to display. Links to external files won’t work.
All filenames should be lowercase; uppercase names won’t work.
I welcome your thoughts, questions or suggestions on my article on how to publish and maintain your WordPress Plugin within the WordPress.org Plugin Directory.
You may support my work by sending me a tip using your Brave browser or by sending me a one time donation using your credit card.
Let me know if you found any errors within my article or if I may further assist you by answering any additional questions you may have.