Naimur Rahman Nahid

How to Publish a WordPress Plugin via SVN Linux Command

The Ultimate Guide to Publishing a WordPress Plugin via SVN

A highly simplified, beginner-friendly deployment tutorial. Forget complex command-line copy/pasting. This guide shows you how to securely manage your trunk, assets, and tags using your computer's visual file manager.

🚀 1. Easy Step-by-Step Deployment Guide

Step 1

Download the Server Repository (Checkout)

Before you can upload files, you must establish a secure connection with WordPress.org. This command creates a localized directory synced with your plugin's database.

Pro Tip: Only run this command once when setting up a new project on your computer.
svn checkout https://plugins.svn.wordpress.org/your-plugin-slug/ .
Step 2

Organize Core Files (Trunk & Assets)

Minimize terminal usage by utilizing your computer's built-in file manager (GUI). Open the downloaded folder and distribute your files:

  • Open the trunk folder and paste all your core plugin files (PHP, CSS, JS, readme.txt).
  • Open the assets folder and paste your promotional materials (banner-1544x500.png, icon-256x256.png).
Step 3

Manually Create the Version Tag

A "Tag" is simply a snapshot of your plugin at a specific version. Instead of using SVN copy commands, do it visually:

  1. Navigate into the tags directory.
  2. Create a brand new folder and name it exactly after your version (e.g., 1.0.0).
  3. Go back, copy all contents from your trunk folder.
  4. Paste them directly inside the new tags/1.0.0 folder.
Critical SEO Rule: Ensure your readme.txt file is located immediately inside the version folder (not hidden in sub-folders).
Step 4

Scan and Track Changes (Add)

Now, return to your Linux terminal. SVN needs to register the files you just pasted manually. This command forces SVN to scan for new additions.

svn add --force .
Step 5

Publish to WordPress (Commit)

You are ready to go live! Execute the commit command. The terminal will securely prompt you for your WordPress.org username and password.

Note: When typing your password in Linux, characters will remain invisible for security reasons. Just type and press Enter.
svn commit -m "Successfully updated and released version 1.0.0"

🛠️ 2. Common SVN Errors & Instant Fixes

SVN is highly strict about file structures. If you face a roadblock, find your error below to resolve it instantly.

⚠️ Error: "E155005: No write-lock" This occurs when a previous upload process gets interrupted, causing the local SVN directory to lock itself defensively to prevent data corruption.
✅ The Fix: Clean the Working Copy Unlock the directory by running the cleanup command, then retry your commit:
svn cleanup
⚠️ Error: "Commit failed: File is out of date" This happens if the WordPress server holds a newer version of the directory than your local computer (e.g., someone else updated a file, or you edited it directly via browser).
✅ The Fix: Synchronize with Server Always sync your local folder with the remote server before committing new changes:
svn update
⚠️ Error: "Malformed tag detected without a readme file" This is a strict WordPress pre-commit hook block. It means you pasted the files into the wrong folder depth. The `readme.txt` file must be directly inside the tag root.
✅ The Fix: Re-structure and Force Update Using your visual file manager, pull the files out of any sub-folders so they sit directly inside tags/version_number/. Then run:
svn add --force .
svn commit -m "Fixed folder structure architecture"

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top