{"id":245,"date":"2021-07-23T12:26:25","date_gmt":"2021-07-23T12:26:25","guid":{"rendered":"https:\/\/ssdsunucum.com\/blog\/the-migrate_legacy_wordpress_to_modern_wordpress-script\/"},"modified":"2021-07-23T12:26:25","modified_gmt":"2021-07-23T12:26:25","slug":"the-migrate_legacy_wordpress_to_modern_wordpress-script","status":"publish","type":"post","link":"https:\/\/ssdsunucum.com\/blog\/the-migrate_legacy_wordpress_to_modern_wordpress-script\/","title":{"rendered":"The migrate_legacy_wordpress_to_modern_wordpress Script"},"content":{"rendered":"<\/p>\n<div class=\"col-md-9\">\n<div class=\"flex-column flex-md-row article-header\"><\/div>\n<hr>\n<h2 id=\"overview\">Overview<\/h2>\n<p>The <code>\/usr\/local\/cpanel\/scripts\/migrate_legacy_wordpress_to_modern_wordpress<\/code> script converts legacy cPAddon WordPress\u00ae installations to use the RPM-based WordPress cPAddon.<\/p>\n<h2 id=\"script-functions\">Script functions<\/h2>\n<p>The <code>\/usr\/local\/cpanel\/scripts\/migrate_legacy_wordpress_to_modern_wordpress<\/code> script performs the following actions for each specified WordPress installation:<\/p>\n<ol>\n<li>Scans the cPanel account\u2019s home directory for the <code>cPanel::Blogs::WordPress.yaml<\/code> file.<\/li>\n<li>Verifies that the WordPress version is greater than 3.7.<\/li>\n<li>Removes the <code>cpaddons-site-software<\/code> WordPress plugin.<\/li>\n<li>Updates the WordPress installation to use the RPM-based WordPress cPAddon.<\/li>\n<\/ol>\n<h2 id=\"run-the-script\">Run the script<\/h2>\n<p>To use this script, run the following command as the <code>root<\/code> user:<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-bash\" data-lang=\"bash\">\/usr\/local\/cpanel\/scripts\/migrate_legacy_wordpress_to_modern_wordpress <span style=\"color:#f92672\">[<\/span>arguments<span style=\"color:#f92672\">]<\/span> user instance<\/code><\/pre>\n<\/div>\n<h3 id=\"user-and-installation-selection\">User and installation selection<\/h3>\n<p>Use the following arguments to target the installations to convert:<\/p>\n<table>\n<thead>\n<tr>\n<th>Argument<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>--all<\/code><\/td>\n<td>Converts all legacy cPAddon WordPress installations to the RPM-based WordPress cPAddon.<\/td>\n<\/tr>\n<tr>\n<td><code>--user<\/code><\/td>\n<td>Converts all legacy cPAddon WordPress installations for the specified cPanel accounts to the RPM-based WordPress cPAddon.<\/td>\n<\/tr>\n<tr>\n<td><code>--instance<\/code><\/td>\n<td>Converts a single legacy cPAddon WordPress installations for the specified cPanel account and instance to the RPM-based WordPress cPAddon.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"other-arguments\">Other arguments<\/h3>\n<p>You can use the following additional arguments with the <code>\/usr\/local\/cpanel\/scripts\/migrate_legacy_wordpress_to_modern_wordpress<\/code> script:<\/p>\n<table>\n<thead>\n<tr>\n<th>Argument<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>--no-color<\/code><\/td>\n<td>Removes the colorized output that the script provides.<\/td>\n<\/tr>\n<tr>\n<td><code>--dryrun<\/code><\/td>\n<td>Only reports information about the currently installed legacy WordPress installations.<\/td>\n<\/tr>\n<tr>\n<td><code>--help<\/code><\/td>\n<td>Returns the script help documentation.<\/td>\n<\/tr>\n<tr>\n<td><code>--verbose<\/code><\/td>\n<td>Returns additional information in the script\u2019s output.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"script-examples\">Script examples<\/h3>\n<p>To convert all legacy WordPress sites on the server, run the following command:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-bash\" data-lang=\"bash\">\/usr\/local\/cpanel\/scripts\/migrate_legacy_wordpress_to_modern_wordpress --all<\/code><\/pre>\n<\/div>\n<p>To convert all the legacy WordPress sites for the <code>frank<\/code> cPanel account, run the following command:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-bash\" data-lang=\"bash\">\/usr\/local\/cpanel\/scripts\/migrate_legacy_wordpress_to_modern_wordpress --user frank<\/code><\/pre>\n<\/div>\n<p>To convert all the legacy WordPress sites for the <code>frank<\/code>, <code>tommy<\/code>, and <code>jenny<\/code> cPanel accounts, run the following command:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-bash\" data-lang=\"bash\">\/usr\/local\/cpanel\/scripts\/migrate_legacy_wordpress_to_modern_wordpress --user frank --user tommy --user jenny<\/code><\/pre>\n<\/div>\n<p>To convert a specific legacy WordPress site for the <code>frank<\/code> cPanel account, run the following command:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-bash\" data-lang=\"bash\">\/usr\/local\/cpanel\/scripts\/migrate_legacy_wordpress_to_modern_wordpress --user frank --instance \/home\/frank\/.cpaddons\/cPanel::Blogs::WordPress.1.yaml<\/code><\/pre>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Overview The \/usr\/local\/cpanel\/scripts\/migrate_legacy_wordpress_to_modern_wordpress script converts legacy cPAddon WordPress\u00ae 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\u2019s 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 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":246,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/245"}],"collection":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/comments?post=245"}],"version-history":[{"count":0,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/245\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media\/246"}],"wp:attachment":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media?parent=245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/categories?post=245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/tags?post=245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}