Upload WordPress Plugin to SVN using Mac

By Shameem Reza
Picture of the author
Published on
Upload WordPress Plugin

Whether you're a seasoned WordPress developer or just starting out, I will share a simple process and empower you to effortlessly publish and update your plugins on the WordPress.org plugin repostery.

Adding New Plugin to WordPress

Congrats on making it this far! You've successfully uploaded a plugin to the WordPress.org plugin repository, and it's passed the rigorous review process. Your plugin is now approved for upload.

For those developers who are still unsure about where to upload their plugin to the WordPress.org plugin repository, don't worry!

If you haven't yet uploaded your plugin to the WordPress.org plugin repository, just follow this link: https://wordpress.org/plugins/developers/add/

Publish a Plugin to the WordPress Plugin Directory
Publish a Plugin to the WordPress Plugin Directory

Add Screenshots to Plugin

Add your plugin's settings screenshots in the /assets folderthe filename for screenshot should be screenshot-1.png, screenshot-2.png and the number corresponds to the description no. of screenshot in readme.txt file:

== Screenshots ==

1-This is the description of screenshot-1.png
2-This is the description of screenshot-2.png

Add Banners for Plugin showcase

Add your plugin banner in the /assets folder. You should make banner of below size and put that in assets folder:

banner-772x250.png

Icon Size for WordPress Plugin

You need to add your plugin icons in the /assets folder.

You should make two icons of below sizes and put them in assets folder.

icon-128x128.png
icon-256x256.png

Upload WordPress plugin in SVN repository

cd ~/plugin-dir                                         # Go to your plugin directory in your local computer
mkdir my-local-dir                                      # Make a new dir my-local-dir inside your plugin directory  
cd my-local-dir
svn co https://plugins.svn.wordpress.org/yourpluginname # load svn repo directories to your my-local-dir
cd ..                                                   # Go back to your plugin directory
cp yourplugin.php my-local-dir/trunk/                   # Copy your main plugin file from your plugin dir into my-local-dir/trunk
cp style.css my-local-dir/trunk/                        # Copy all other files and dir from your plugin dir into my-local-dir/trunk
cp custom-functions.php my-local-dir/trunk/             # Copy your custom-functions file from your plugin dir into my-local-dir/trunk
cp readme.txt my-local-dir/trunk/                       # Copy your readme.txt file into 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/
cd my-local-dir/yourplugin-dir-name                     # Go to plugin dir
svn add trunk/*                                         # Add all files to svn trunk repo
svn add assets/*                                        # Add all files to svn assets repo
svn ci -m 'Adding first version of my plugin'           # push the files you have uploaded into /truck dir of local svn repo to online svn repo
# now put your wordpress.org password

Add New files to SVN during Plugin update

cd ~/plugin-dir
cp yournewfile.php my-local-dir/yourplugin-dirname/trunk/  ( or my-local-dir/yourplugin-dirname/assets/ whichever dir you want to add to )
cd my-local-dir/yourplugin-dirname
svn up
svn stat
svn add trunk/* --force
svn stat
svn ci -m 'Add new file'               # push the changes to online svn repo

Update existing files to SVN during Plugin update

cd my-local-dir //make changes to your files 
svn up
svn stat
svn add trunk/* --force
svn stat
svn ci -m 'Add new file'               # push the changes to online svn repo

Delete a File from SVN

cd my-local-dir/yourplugin-dir-name //GO to that file or folder and delete using svn delete filename
svn delete filename
cd my-local-dir
svn up
svn stat
svn add trunk/* --force
svn stat
svn ci -m 'Add new file'               # push the changes to online svn repo

Update WordPress plugin after downloading it from the SVN

# Download Plugin your existing plugin from wordpress once you have made all the changes to your file go to your updated dir locally
mkdir my-local-dir                                      # Make a new dir my-local-dir
cd my-local-dir
svn co https://plugins.svn.wordpress.org/your-plugin-slug # load svn repo directories to your my-local-dir

# Now make the necessary updates

cd my-local-dir/yourplugin-dirnme
svn up
svn stat
svn add trunk/* --force
svn stat
svn ci -m 'Add new file'               # push the changes to online svn repo

Conclusion

You've now mastered uploading WordPress plugins to SVN using your Mac.

With SVN's version control, collaboration, and WordPress integration, you're set to streamline your development process. Keep exploring SVN's features to enhance your plugin development.

Happy coding, and may your plugins bring joy to the WordPress users worldwide!

Hi there! Want to support my work?

Stay Tuned

Boost Your Skills On WordPres & WooCommerce!
The best articles, links and news related to CSS, JavaScript, front-end, WordPress and WooCommerce delivered once a week to your inbox.
Unsubscribe anytime. Your data is safe.