Error After Changing URLs in WordPress General Settings

A white, rounded square logo with an abstract S-shaped design on a gradient blue and purple background.

Recently, a client decided to purchase an alternative domain name for their existing website. They decided to log into their WordPress dashboard and start poking around. They changed the WordPress Address and Site Address under General Settings to the new domain name. Needless to say, this wasn’t a good idea. After the changes were saved, the website was no longer functioning.


The site wasn’t displaying and I couldn’t access the WordPress login to get to the dashboard. In order to correct the issue, I needed FTP access so I could modify the wp-config.php and functions.php file.

The following code can be used to manually define a website URL through the wp-config.php file.


Within seconds the website was working.

However, I was faced with another issue. When I logged in to WordPress and went back to the General Settings, the text fields were disabled.


In order to edit these fields, I added the following code to the top of the functions.php file, immediately after the initial “<?php” line.


After I uploaded the new version of the functions.php file, I removed the code that was added to the wp-config.php file.

When I logged back into WordPress, the text fields under General Settings were editable.

The last step was to remove the code that I added to the functions.php file and the issue was solved.

Check out my previous post, which will show you how to use your .htaccess file to redirect an alternative domain.

Share This

Join the Sales and Marketing News, receive our last insights, tips and best practices.

Our 7 Guarantees

Keeping 2,000+ Clients Happy Since 2001.

You Will Love Your Design We design to please you and your clients
Same-Day Support 24-hour turnaround edits during business hours
Free Education We provide knowledge to help you expand
No Hidden Charges We quote flat-rate projects
Own Your Site No strings attached
We Create Results SEO, PPC, content + design = clients
We Make Life Easier One agency for web, branding and marketing