The migrate_legacy_wordpress_to_modern_wordpress Script
Overview
The /usr/local/cpanel/scripts/migrate_legacy_wordpress_to_modern_wordpress
script converts legacy cPAddon WordPress® installations to use the RPM-based WordPress cPAddon.
Script functions
The /usr/local/cpanel/scripts/migrate_legacy_wordpress_to_modern_wordpress
script performs the following actions for each specified WordPress installation:
- Scans the cPanel account’s home directory for the
cPanel::Blogs::WordPress.yaml
file. - Verifies that the WordPress version is greater than 3.7.
- Removes the
cpaddons-site-software
WordPress plugin. - Updates the WordPress installation to use the RPM-based WordPress cPAddon.
Run the script
To use this script, run the following command as the root
user:
/usr/local/cpanel/scripts/migrate_legacy_wordpress_to_modern_wordpress [arguments] user instance
User and installation selection
Use the following arguments to target the installations to convert:
Argument | Description |
---|---|
--all |
Converts all legacy cPAddon WordPress installations to the RPM-based WordPress cPAddon. |
--user |
Converts all legacy cPAddon WordPress installations for the specified cPanel accounts to the RPM-based WordPress cPAddon. |
--instance |
Converts a single legacy cPAddon WordPress installations for the specified cPanel account and instance to the RPM-based WordPress cPAddon. |
Other arguments
You can use the following additional arguments with the /usr/local/cpanel/scripts/migrate_legacy_wordpress_to_modern_wordpress
script:
Argument | Description |
---|---|
--no-color |
Removes the colorized output that the script provides. |
--dryrun |
Only reports information about the currently installed legacy WordPress installations. |
--help |
Returns the script help documentation. |
--verbose |
Returns additional information in the script’s output. |
Script examples
To convert all legacy WordPress sites on the server, run the following command:
/usr/local/cpanel/scripts/migrate_legacy_wordpress_to_modern_wordpress --all
To convert all the legacy WordPress sites for the frank
cPanel account, run the following command:
/usr/local/cpanel/scripts/migrate_legacy_wordpress_to_modern_wordpress --user frank
To convert all the legacy WordPress sites for the frank
, tommy
, and jenny
cPanel accounts, run the following command:
/usr/local/cpanel/scripts/migrate_legacy_wordpress_to_modern_wordpress --user frank --user tommy --user jenny
To convert a specific legacy WordPress site for the frank
cPanel account, run the following command:
/usr/local/cpanel/scripts/migrate_legacy_wordpress_to_modern_wordpress --user frank --instance /home/frank/.cpaddons/cPanel::Blogs::WordPress.1.yaml