Home » How to Submit and Upload a New WordPress Plugin to SVN | Complete Guide

How to Submit and Upload a New WordPress Plugin to SVN | Complete Guide

by Shubham Verma
Published: Updated: 0 comments 94 views 8 minutes read
How to Submit and Upload a New WordPress Plugin to SVN | Complete Guide

In this comprehensive guide, you will learn how to upload a new approved WordPress plugin or update an existing plugin on the Subversion (SVN) repository. Follow these steps to streamline the process and ensure a smooth plugin submission to the WordPress Plugin Directory.

1. Submitting a New WordPress Plugin

Step 1: Upload Your Plugin to WordPress

To submit your plugin, visit the following link: Submit Plugin to WordPress

Required Files:

  • Readme.txt: Ensure your plugin has a proper readme.txt file.
  • Screenshots: Screenshots are essential for showcasing your plugin. These must be added to the /assets folder.

Screenshot Naming Convention:

  • screenshot-1.png
  • screenshot-2.png

The filenames correspond to the screenshot descriptions in the readme.txt file:

== Screenshots ==

1. screenshot-1.png
2. screenshot-2.png

Creating Banners and Icons:

  • Banners: Store these in the /assets folder.
    • banner-772x250.png (recommended size)
  • Icons: Upload the following icon sizes in the /assets folder:
    • icon-128x128.png
    • icon-256x256.png

2. Uploading Your Plugin to the SVN Repository

SVN (Subversion) is a version control system, similar to Git. If you’re on a Mac, you can install SVN by running the command:

brew install svn

For more information on using SVN, refer to the official WordPress SVN Documentation.

Steps to Upload Plugin via SVN:

  1. Navigate to your plugin directory:
cd ~/plugin-dir
mkdir my-local-dir  # Create a new directory for SVN
cd my-local-dir
svn co https://plugins.svn.wordpress.org/yourpluginname

2. Copy your plugin files:

cp yourplugin.php my-local-dir/trunk/
cp style.css my-local-dir/trunk/
cp custom-functions.php my-local-dir/trunk/
cp readme.txt my-local-dir/trunk/
cp screenshot-1.png my-local-dir/assets/
cp icon-128x128.png my-local-dir/assets/
cp icon-256x256.png my-local-dir/assets/

3. Add and commit your files to the SVN repository:

cd my-local-dir/yourplugin-dir-name
svn add trunk/*
svn add assets/*
svn ci -m 'Adding first version of my plugin'

When prompted, enter your WordPress.org username and password.

3. Adding New Files to SVN During a Plugin Update

To add new files when updating a plugin:

  1. Navigate to your plugin directory:
cd ~/plugin-dir
cp yournewfile.php my-local-dir/yourplugin-dirname/trunk/

2. Commit the changes:

cd my-local-dir/yourplugin-dirname
svn up
svn stat
svn add trunk/* --force
svn ci -m 'Add new file'

4. Updating Existing Files in SVN

To update existing files during a plugin update:

  1. Navigate to the local directory where you made your changes:
cd my-local-dir

2. Update and commit the changes:

svn up
svn stat
svn add trunk/* --force
svn ci -m 'Updated existing files'

5. Deleting a File from SVN

To delete files from the SVN repository:

  1. Delete the file or folder:
svn delete filename

2. Commit the deletion:

svn ci -m 'Deleted file'

6. Updating Your Plugin After Downloading from SVN

If you need to download and update your plugin from SVN:

  1. Create a local directory and check out your plugin:
mkdir my-local-dir
cd my-local-dir
svn co https://plugins.svn.wordpress.org/your-plugin-slug

2. Make the necessary updates and commit:

cd my-local-dir/yourplugin-dirname
svn up
svn stat
svn add trunk/* --force
svn ci -m 'Plugin updates'


Final Thoughts

Uploading a WordPress plugin to the SVN repository may seem technical, but by following these steps, you can submit and maintain your plugin effectively. Make sure you follow the naming conventions for assets like icons and banners, and always use proper version control practices when updating your plugin.

For more detailed instructions, always refer to the official WordPress Plugin Developer Documentation.

You may also like

Leave a Comment

ShubhamVermma.com: Your one-stop destination for live technical tutorials. Master PHP, Laravel, WordPress, Node.js, and more with our expert instructors.

Subscribe

Subscribe my Newsletter for new Articles. Let's stay updated!

A Technology Media Company – All Right Reserved.