This guide covers the layout and day-two configuration of the CloudSOE WooCommerce image on both AWS and Azure. It assumes you’ve finished one of the getting-started guides (AWS, Azure).
File locations
| Path | Purpose |
|---|---|
/var/www/wordpress | WordPress document root (WooCommerce lives in wp-content/plugins/woocommerce) |
/var/www/wordpress/wp-config.php | Database settings and salts (generated at first boot) |
/opt/wordpress/default-wordpress-credentials.txt | Generated DB and store admin credentials (mode 600) |
/usr/local/bin/wp | wp-cli, preinstalled |
/etc/apache2/sites-enabled/ | Apache virtual host for HTTP and HTTPS |
/etc/ssl/certs/wordpress-selfsigned.crt | Per-instance TLS certificate |
/etc/ssl/private/wordpress-selfsigned.key | Per-instance TLS private key |
Services
Apache and MariaDB are managed by systemd and enabled at boot:
sudo systemctl status apache2 mariadb
sudo systemctl restart apache2 # after config changes
The two one-time setup services, wordpress-firstboot and woocommerce-firstboot, only run until they succeed once; after that they exit immediately thanks to their marker files (/var/lib/wordpress-firstboot.done, /var/lib/woocommerce-firstboot.done).
Manage the store with wp-cli
wp-cli is preinstalled — the same tool first boot used to install the site. Run it as the web user:
sudo -u www-data wp --path=/var/www/wordpress plugin list
sudo -u www-data wp --path=/var/www/wordpress user update admin --user_pass='a-new-strong-password'
sudo -u www-data wp --path=/var/www/wordpress option get siteurl
Database access
The store uses a local MariaDB database:
- Database:
wordpress - User:
wordpress - Password: in
wp-config.phpand in the credentials file
Connect from the shell with sudo mysql wordpress, or use phpMyAdmin at https://<your-ip>/phpmyadmin with the wordpress database user. If you don’t need phpMyAdmin, remove it:
sudo apt remove --purge phpmyadmin
Replacing the self-signed certificate
The image generates a self-signed certificate at first boot so HTTPS works immediately, but browsers won’t trust it — and payment providers require a real certificate. Once your domain points at the instance, switch to Let’s Encrypt:
sudo apt install certbot python3-certbot-apache
sudo certbot --apache -d example.com -d www.example.com
Alternatively, install a purchased certificate and key at the paths in the table above, then sudo systemctl reload apache2 — always replace both files together.
Pointing a domain at your store
- Create an A record for your domain pointing at the instance’s public IP (on AWS, allocate an Elastic IP first so the address survives stop/start; on Azure, set the public IP to Static).
- Update the store’s own URL with wp-cli:
sudo -u www-data wp --path=/var/www/wordpress option update home 'https://example.com'
sudo -u www-data wp --path=/var/www/wordpress option update siteurl 'https://example.com'
Uploading files over SFTP
The admin user (ubuntu on AWS, your chosen username on Azure) can upload with any SFTP client and your SSH key:
sftp ubuntu@<public-ip>
sftp> cd /var/www/wordpress/wp-content
Keep file ownership consistent after bulk uploads:
sudo chown -R www-data:www-data /var/www/wordpress/wp-content
Next steps
- Tips & tricks — backups, updates, performance and troubleshooting