WordPress Toolkit main-domain-id change/update

Petros

Registered
Jan 18, 2022
4
1
3
Cyprus
cPanel Access Level
Root Administrator
Hello,

I need to change the main-domain-id of an existing WordPress Toolkit attached installation. I tried detaching and registering the new installation using the command (tried with and without the /):

wp-toolkit --register -main-domain-id 4 -path /testwebsite

without any success. The last registered website has an ID of 4 (shown using the command wp-toolkit --list)

I have successfully registered the site (using the command wp-toolkit --register -domain-name testwebsite.ucy.ac.cy) but the domain id number given is much bigger, I suppose there must be a way to re-set the site registration indexing number!


Thank you,


Petros
 
Last edited:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
10,924
1,718
363
cPanel Access Level
Root Administrator
Hey there! Inside the WordPress Toolkit interface, there is a "clone" feature that would allow you to duplicate the site content. Here is a screenshot showing this:

Screen Shot 2022-06-21 at 3.13.37 PM.png

I'm not finding anything about updating the specific indexing number. Is there a specific reason you would need to keep that number the same after the operation has been completed?
 

Petros

Registered
Jan 18, 2022
4
1
3
Cyprus
cPanel Access Level
Root Administrator
Hey there! Inside the WordPress Toolkit interface, there is a "clone" feature that would allow you to duplicate the site content. Here is a screenshot showing this:

View attachment 78601

I'm not finding anything about updating the specific indexing number. Is there a specific reason you would need to keep that number the same after the operation has been completed?
Hi!

I keep WordPress toolkit backups using a shell script, using the following command to perform each one for all of the hosted domains:

/usr/local/bin/wp-toolkit --backup -instance-id 3 -operation backup

It would be easier for me to just add 1 to the above instance-id instead of performing wp-toolkit --list to record the id of newly created domains, as sometimes detaching is necessary and by reattaching the domain, this index is not assigned based on the last used one but from its last number (assigned) increased by 1.

Thank you.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
10,924
1,718
363
cPanel Access Level
Root Administrator
I spoke with the WordPress Toolkit team, and confirmed there is not a way to change the Instance ID once it is created. They did recommend using the main-domain-id variable instead if that is easier, as that also works with the --backup command.
 

Petros

Registered
Jan 18, 2022
4
1
3
Cyprus
cPanel Access Level
Root Administrator
I spoke with the WordPress Toolkit team, and confirmed there is not a way to change the Instance ID once it is created. They did recommend using the main-domain-id variable instead if that is easier, as that also works with the --backup command.
Thank you for the information.
 
  • Like
Reactions: cPRex