So you changed the site URL and your website is down. Don’t Panic!
If you can’t access wordpress after changing the site url, there’s a few reasons this could happen.
- The most obvious is a typo
- Your DNS settings may not be setup for WWW, HTTPS, etc..
There’s three different solutions to fix this issue if you can’t access your WordPress site after changing the site url. I will list them by my personal preference of simplicity.
1. Change the site URL through PHPMyAdmin
If you don’t have access to PHPMyAdmin or don’t feel comfortable editing the database skip to step 2.
*Note: Always take a back up before making changes in the database.
Below is a quick gif showing how I changed the URL and added the WWW to my url structure.
Here’s some written steps
- Login to your PHPMyAdmin Dashboard
- Locate your database
- Expand your database and select wp_options (your database may have a different prefix than WP)
- Find the two tables: ‘siteurl’ and ‘home’. You will update both of these. Click edit on one.
- Change the url and click go. Do this for both and you are done.
2. Edit your wp-config
This is a temporary solution to get you back up and running.
- Edit your wp-config.php file (located in your root folder)
Define your WP_HOME and WP_SITEURL settings by inserting these two lines somewhere towards the top:
3. Change the site URL through your functions file.
The last way is you can change the site url is through your functions.php file.
Simply add this code to the top of your file:
Any of these three will get you back up and running if your site is down.
Is there a 4th way? Let me know!