• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Bulk Import 200+ WP subscriptions

martimcfly

New Pleskian
I'm currently evaluating Plesk (10 days left) to run current and future Wordpress sites. I would need to bulk import 200+ WP sites.

I figured out how to set the default subscription service-plans and with the following command I do get valid subscriptions with correct wordpress setups, however I need a way to force the Wordpress DB Name and DB user, so that I can also import sql in the rest of the migration script..

Is there a way to force WP DBName and DBUser ?

Command --
plesk bin subscription --create testdomain3.com -owner admin -service-plan "WordPress" -ip 1.2.3.4 -login testdomain3.com -passwd "userpass"

--
Is the only way to remove the auto-generated WP db+user and create new WP dp+user, after the above command?



Running Latest onyx on ubuntu 16.04
Thank you.
 
Hello,

I would like to suggest you to use Plesk Migrator extension Plesk Migrator - Plesk Extensions to import domains from the list of supported hosting panels, like cPanel, DirectAdmin, legacy versions of Plesk, etc. If your websites hosted on those panels, you can easily import them at once.

If you websites hosted on another panels or you do not have an root access to the source server you still able to import sites using Website Migration feature of Plesk Migrator: Website Migration.

As you want to import a lot of site, I suppose, you need a CLI solution to automate it, right? Website Migration do not have a public CLI interface, but bulk import is possible with some workaround.
 
@martimcfly

The solution suggested by @Aleksey Filatev is a solid and recommended solution.

However, in your original post you stated

Is the only way to remove the auto-generated WP db+user and create new WP dp+user, after the above command?

which seems to suggest that it might be the case that you cannot use the Plesk Migrator.

If it is the case that you cannot use the Plesk Migrator, then (in chronological order)

1 - simply create subscriptions, manually or via an automated script,

2 - go to the origin server (where the WP sites are hosted now) and create a database dump containing all of the WordPress databases: one dump, without any additional information that is related to the old server or setup thereof,

3 - go to the source server (the new Plesk instance) and use Phpmyadmin or the mysql CLI utility to import the database dump from step 2: be careful, be aware that you can make some mistakes and/or have to engage in a trial-and-error process,

4 - rsync all relevant WordPress instance data to the source server: use a simple script to make sure that all WP related content ends up in the right directory and make sure that those directories have the correct permission and ownership structure (see: Virtual Host Structure (Linux))

5 - install and use the WPT (WordPress Toolkit extension) and run a scan to identify all installed WP instances and/or problems with those instances,

and that should be it.

Note that it is recommended to test these steps on a small batch of WP domains first.

In essence, steps 1 to 5 are replicating the processes of the Plesk Migrator to a large degree, with the only difference that

- the WP passwords and connection strings are preserved (which is not a good idea, by the way)
- the WP database prefixes are preserved (and not replaced by the custom string prefixes that occur when creating a new Plesk based WP instance).

Note that I personally recommend to change the old WP database prefixes to the new prefixes created by Plesk: this will prevent issues with WPT.

In order to do so, one can simply run a tiny script changing the database prefixes in (each of) the individual wp-config files.


In general, try to use the Plesk migrator solution first!

Hope the above helps a bit.

Regards.........
 
Back
Top