Uploading WordPress Plugins To An SVN Using A Mac

Looking for a guide to upload your new WordPress plugin to an SVN using a Mac? All you may need is to follow this guide to successfully commit your plugin’s files.

Committing files to an SVN using Terminal

To commit your plugin’s files to the WordPress repository, you need to open Terminal on your Mac and follow the steps below:

  1. Once opening the Terminal application, you need to change directory into somewhere more relevant. Type cd ~/Documents to navigate to your Mac’s documents folder.
  2. In this folder, type mkdir wordpress-svn-files to generate a directory to hold your SVN files.
  3. Navigate into this folder by typing cd wordpress-svn-files
  4. Connect to the SVN by typing svn co https://plugins.svn.wordpress.org/plugin-slug-by-wordpress and this will download the current contents from the repository.
  5. Copy and paste your plugin’s files into the folders accordingly.
  6. Type cd plugin-slug-provided-by-wordpress so that you are inside the directory.
  7. Type ls to confirm you see the four folders (assets, branches, tags and trunk).
  8. Type svn add * ‐‐force to determine the files you wish to commit (this command should grab all files under the current directory).
  9. Type svn commit -m Committing to commit the files.
  10. If it’s your first time committing files into an SVN, you’ll have to supply your computer’s password (if set) and also your WordPress username and password (case-sensitive) after this.
  11. If successful, you should receive an automated email from WordPress to confirm the transfer of files.

Note, if you’re getting the error: xcrun: error invalid active developer path when trying to connect to the SVN, you may just need to install Xcode by typing xcode-select ‐‐install.