GoAdmio

primary

Convert an addon domain to a primary domain by clearing its owner in GoAdmio's database

On this page: Overview · Quick start · Syntax · Options · Output · Examples · Troubleshooting · Details · See also


Overview

/go/primary turns an addon domain into a primary domain. In GoAdmio, an addon domain is an account that has an owner (another domain it belongs to). This command removes that owner, so the account is no longer an addon of anything and is treated as a primary domain.

It makes one change: it clears the owner of the domain in GoAdmio's account database. It does not move files, rebuild configuration, or check anything first.

The command runs sudo internally, so run it as root or as a user with sudo rights.


Quick start

# Make an addon domain a primary domain
/go/primary shop.example.com

Syntax

/go/primary <domain>

Every run is recorded in /var/log/go/primary.log, with the time and the arguments you passed.


Options

Argument Required Notes
domain Yes The addon domain to convert, written exactly as it is stored in GoAdmio.

Output

Outcome What you get
Command ran The Addon Domain "<domain>" has been successfully changed to the Primary Domain.

[!WARNING] The confirmation is printed every time, even if the domain doesn't exist, was already a primary domain, or was misspelled. It doesn't mean a change was made. Check the result with the query under Examples.

Log

Each run appends one line to /var/log/go/primary.log:

[Nov 21 12:00:00]# primary shop.example.com

Examples

# Convert an addon domain to a primary domain
/go/primary shop.example.com
# Check the result: the Owner column should be empty
sudo sqlite3 /var/lib/sqlite/site.db "SELECT Domain, Owner FROM Site WHERE Domain='shop.example.com'"

Troubleshooting

Symptom Likely cause Fix
The confirmation appears but nothing changed The domain isn't in the Site table, is misspelled, or was already a primary domain. Run the check query under Examples and correct the domain.
The domain still looks like an addon somewhere Only the owner field was cleared. Other settings aren't rebuilt. Rebuild the domain's configuration with conf.
You need to make a primary domain an addon again This command only works one way. Create the account with an owner using create and its --owner option.

Details

What it changes

Item Change
Owner field of the domain in the Site table (/var/lib/sqlite/site.db) Set to empty.
Files, FTP/system user, databases, mailboxes Unchanged.
DNS, SSL certificates, web server and PHP-FPM configuration Unchanged.

The command doesn't take a snapshot first, and it doesn't check whether the account is an addon, or whether it is in the trash. To change the main domain of an account instead, use domain, which takes a snapshot first.


See also

Command Description
create Create a GoAdmio account from the command line
domain Change the primary domain of a hosting account, with an automatic snapshot first
alias Create or delete an alias domain (parked domain) for a hosted site
subdomain Create, edit, or delete a subdomain
conf Rebuild Apache/Nginx virtual hosts, PHP-FPM pools, and SSL for all accounts, or the web configuration of one domain