WordPress
A WordPress site on Cove is a normal WordPress install in ~/Cove/Sites/<name>.localhost/public, with a MariaDB database of its own and an address at https://<name>.localhost.
A new site#
cove add mysite # the latest WordPress
cove add mysite 6.4.3 # a version: 6.4, 6.4.3 or 6.9-RC1
cove add mysite nightly # WordPress trunk, rebuilt daily--wp-version=6.4.3 is the same as giving the version on its own. Cove prints the address, the login and a link that logs you straight in:
✅ WordPress Installed URL: https://mysite.localhost/wp-admin User: admin Pass: k3vq8rmz2pwa One-time login URL: https://mysite.localhost/wp-login.php?user_id=1&cove_login_token=…
What's set up#
- An admin user with a made-up password.
- WP_ENVIRONMENT_TYPE set to local, so WordPress and plugins that check wp_get_environment_type() treat the site as a sandbox.
- WP_DEBUG and WP_DEBUG_LOG on, writing to wp-content/debug.log, with errors kept off the page.
- A small must-use plugin, captaincore-helper.php, that makes one-time login links work.
- Mail goes to Cove's mailbox, never to a real inbox. See Mail.
Multisite#
cove add mysite --multisite # subsites at mysite.localhost/store/
cove add mysite --multisite=subdomain # subsites at store.mysite.localhostNew subsites work with no extra setup, subdomains included: each gets its address and HTTPS on its own. cove network mysite lists the sites on a network with their addresses and ids.
An older PHP#
On macOS, --php=8.2 pins the new site to PHP 8.2. You can pin or unpin it later with cove php. See PHP.
Minn Engine#
cove add mysite minn installs the latest WordPress and then Minn Engine over it, with WordPress's own files parked in wp-parked/. Its admin is at /minn-admin/. --minn=<url or path> installs a particular Minn Engine zip instead of the latest release.
Logging in#
cove login prints a link that logs you in without a password. It works once, within 15 minutes.
cove login mysite # as the first administrator
cove login mysite editor@example.com # as someone else: an id, email or login
cove login mysite --user=editor # the same, as a flag
cove login mysite --url=https://mysite.localhost/store/ # a subsite of a network
cove login mysite --plain # only the link, for scriptsA site you copied in by hand whose database still names its live address gets its URLs rewritten to the local one first, with the database saved to its private/ folder before the change.
WP-CLI#
cove wp runs WP-CLI inside a site from any folder, on the PHP that site runs on.
cove wp mysite plugin list
cove wp mysite option get siteurl
cove wp mysite user create dev dev@mysite.localhost --role=editorA --help after the site name is WP-CLI's own help.
WordPress versions#
cove core looks after WordPress itself, separately from cove upgrade, which upgrades Cove.
cove core check # every site's version, flagging outdated or insecure ones
cove core update mysite # to the latest release
cove core update mysite 6.4.3 # to a version, older ones included
cove core update mysite --dry-run # what it would do, changing nothing
cove core update --all --dry-run # what updating every site would change
cove core update --all # every site that's behind--dry-run works for one site or all of them. Updating every site asks first. --yes skips the question.
In the dashboard#
A WordPress site's page in the dashboard has tabs for its plugins and themes (activate, update, delete, check for updates), its users (log in as any of them, or add one), its cron events (run one now, or every one that's due), and a WP-CLI console. On a multisite network it lists every subsite with its own log in link.
Moving and backing up#
Pulling a site down from a host, pushing it back, snapshots, and the nightly record of plugin and theme changes are in Backups and moving.
Something wrong or missing here? Open an issue ↗ Every command also explains itself: cove help <command>.