domain with the /go/domain Command

/go/domain moves an existing hosting account to a new primary domain. It: Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

/go/domain old-example.com new-example.com

Arguments

Argument Required Default Notes
<current-domain> Yes — The account’s current primary domain, as stored in GoAdmio.
<new-domain> Yes — The new primary domain. Becomes the account’s domain and its username.
--progress No Off Prints progress numbers.

Examples

# Change the primary domain
/go/domain old-example.com new-example.com

# Same, with progress numbers
/go/domain old-example.com new-example.com --progress

# Check the result
ls /home/new-example.com
tail /var/log/go/domain.log

# Recommended follow-up: set a known password and request SSL
/go/password new-example.com 'N3wS3cureP4ss'
/go/ssl new-example.com

Output

Outcome What you get
Start A snapshot of the current domain (<new-domain>) will be taken before changing the primary domain... (the message shows the new domain, although the snapshot is of the current one).
After the snapshot Changing primary domain started now...
New account created The single-line JSON result of create. It contains the new account’s generated password in plain text.
Finished Primary domain name changed successfully...

The command always exits with code 0, including after errors, because it never calls exit and doesn’t check the result of any step.

Progress numbers

With --progress, each number prints when that stage starts or finishes:

Number After
10 The snapshot announcement.
20 The snapshot finished, before the new account is created.
30 The folder is moved and ownership is fixed.
50 The database records are re-pointed.
70 The old system user, PHP-FPM pool, and Apache config are removed.
100 Everything is finished.

Logging

Every run is appended to /var/log/go/domain.log with a timestamp and the arguments.

See the full reference at /go/domain and the GoAdmio command index.

GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.

By:

Posted in:


Leave a Reply

Your email address will not be published. Required fields are marked *