Prerequisites
- Have WordPress installed1
Guide
There are two ways to set the WordPress Home and Site URL:
- Via the admin dashboard (recommended)
- By hardcoding the values in wp-config.php
Use the hardcoded method if:
- You can’t access the WordPress dashboard
- Your site is unreachable
- The WordPress Address and Site Address fields are greyed out
The preferred method (in the dashboard)
- Log in to your WordPress dashboard.
- Go to Settings → General.
- Update both the WordPress Address and the Site Address.
The hardcoded way
- Go to the WordPress directory and open the html folder.
- Open the
wp-config.phpfile:- Either via CasaOS’ file manager
- Or from the terminal (run this in the WordPress path):
Bash
sudo nano wp-config.php- Add the following lines just before
/* That’s all, stop editing! Happy publishing. */
PHP
define('WP_HOME', 'https://yourdomain.com');
define('WP_SITEURL', 'https://yourdomain.com');- Save the file and restart the WordPress container.
- To install wordpress you may use this guide ↩︎