Ga naar inhoud

Managing Paid WordPress Plugins

Overview

Lemone maintains paid WordPress plugins in private GitLab repositories for version control and consistent deployments across projects. This guide covers how to update paid plugins.


Updating Paid Plugins

Process

Step 1: Locate the Plugin Repository

Find the plugin repository at: https://codepot.nl/developers/plugins/paid

Common paid plugins: - Advanced Custom Fields Pro (advanced-custom-fields) - Gravity Forms (gravityforms) - WP Migrate DB Pro (wp-migrate-db-pro) - WPML (wpml)

Step 2: Clone the Repository Locally

git clone git@codepot.nl:developers/plugins/paid/[plugin-name].git
cd [plugin-name]

Step 3: Remove Existing Files

# Remove all files in the repository
rm -rf *
rm -rf .* 2>/dev/null  # Remove hidden files (except .git)

Step 4: Download New Plugin Version

  1. Go to the plugin's official website
  2. Log in with Lemone credentials
  3. Download the latest version
  4. Extract the plugin ZIP file

Step 5: Copy New Files to Repository

# Assuming you downloaded and extracted to ~/Downloads/plugin-name/
cp -r ~/Downloads/plugin-name/* .

Step 6: Verify the Version

Double-check which version you're updating to:

# Check plugin header for version
grep "Version:" *.php

Or check README or CHANGELOG files.

Step 7: Commit the Changes

Use this commit message format:

git add .
git commit -m "📦 Bump to version X.X.X"

Example:

git commit -m "📦 Bump to version 6.3.3"

Step 8: Push to Repository

git push origin main

Step 9: Create a Version Tag

Option A: Via Command Line

git tag -m "Version X.X.X" -a "vX.X.X" && git push --tags

Example:

git tag -m "Version 6.3.3" -a "v6.3.3" && git push --tags

Option B: Via GitLab Web Interface

  1. Navigate to the repository in GitLab
  2. Go to Code → Tags → New tag
  3. Enter tag name in format: vX.X.X (e.g., v6.3.3)
  4. Add release notes (optional)
  5. Click Create tag

Step 10: Update Projects

Now you can update this paid plugin in projects that use it.


Using Paid Plugins in Projects

Adding via Composer

In your project's composer.json:

{
  "repositories": [
    {
      "type": "package",
      "package": {
        "name": "paid-plugin/advanced-custom-fields-pro",
        "version": "6.3.3",
        "type": "wordpress-muplugin",
        "source": {
          "type": "git",
          "url": "git@codepot.nl:developers/plugins/paid/advanced-custom-fields.git",
          "reference": "tags/v6.3.3"
        }
      }
    }
  ],
  "require": {
    "paid-plugin/advanced-custom-fields-pro": "v6.3.3"
  }
}

Updating in Projects

Step 1: Update composer.json

Change the version number in both repositories and require sections.

Step 2: Update Composer

composer update paid-plugin/advanced-custom-fields-pro

Or to update all plugins:

composer update

Step 3: Test

  1. Test the update in local development (Lando)
  2. Verify plugin functionality
  3. Check for breaking changes
  4. Review plugin changelog

Step 4: Deploy

Once tested, commit and deploy:

git add composer.json composer.lock
git commit -m "chore(deps): update ACF Pro to v6.3.3"
git push

Common Paid Plugins

Advanced Custom Fields Pro

  • Repository: advanced-custom-fields
  • Official site: advancedcustomfields.com
  • Composer package: paid-plugin/advanced-custom-fields-pro
  • Installation type: wordpress-muplugin

Gravity Forms

  • Repository: gravityforms
  • Official site: gravityforms.com
  • Composer package: paid-plugin/gravityforms
  • Installation type: wordpress-plugin

WP Migrate DB Pro

  • Repository: wp-migrate-db-pro
  • Official site: deliciousbrains.com
  • Composer package: paid-plugin/wp-migrate-db-pro
  • Installation type: wordpress-plugin

Best Practices

  1. Test updates locally first - Always test plugin updates in Lando before deploying
  2. Read changelogs - Review plugin changelogs for breaking changes
  3. Update regularly - Keep plugins up to date for security and features
  4. Version control - Always use tagged versions in Composer
  5. Commit lock file - Always commit composer.lock after updates
  6. Document breaking changes - Note any breaking changes in commit messages

Troubleshooting

Plugin Update Fails

Issue: Composer can't find the plugin version

Solution: Check that: - Tag exists in GitLab repository - Tag format is correct (vX.X.X) - SSH key has access to the repository - Version matches in both repositories and require

License Key Issues

Some plugins require license keys. Store them in .env:

# .env
ACF_PRO_LICENSE="your-license-key"
GF_LICENSE="your-license-key"

Configure in config/application.php:

// Advanced Custom Fields Pro
Config::define('ACF_PRO_LICENSE', env('ACF_PRO_LICENSE'));

// Gravity Forms
Config::define('GF_LICENSE_KEY', env('GF_LICENSE'));

Composer Authentication

If Composer can't access GitLab repositories:

# Add SSH key to ssh-agent
ssh-add ~/.ssh/id_ed25519

# Test GitLab access
ssh -T git@codepot.nl

See Also