I mistyped my domain name information. How can I fix this. I have dumped two urls restarting
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hey there!
As this is a fresh new Droplet, the quickest option would be to just delete the old one and create a new one.
Alternatively, you can fix the domain name issue in WordPress by updating the site URL and home URL. Here’s how you can do it:
Using the wp
CLI you can easily update the URLs directly from your terminal. Run the following commands:
wp option update home 'http://your-correct-domain.com'
wp option update siteurl 'http://your-correct-domain.com'
Make sure to replace http://your-correct-domain.com
with your actual domain.
If you don’t have WP-CLI, you can update the URLs directly in the database. Follow these steps:
mysql -u root -p
USE your_database_name;
UPDATE wp_options SET option_value = 'http://your-correct-domain.com' WHERE option_name = 'home';
UPDATE wp_options SET option_value = 'http://your-correct-domain.com' WHERE option_name = 'siteurl';
Replace http://your-correct-domain.com
with your actual domain name.
If you’re locked out of the admin area, you can hard-code the URLs directly in your wp-config.php
file as a temporary fix. Open the file and add these lines:
define('WP_HOME','http://your-correct-domain.com');
define('WP_SITEURL','http://your-correct-domain.com');
Once you’re able to access the admin dashboard, remember to remove these lines after fixing the URLs permanently.
This should get your WordPress setup back on track! Let me know if you need further help!
- Bobby
Heya,
You have two options the way I see it. The first one is to find anywhere your domain has been hardcoded in terms of WordPress and change it or just create a new Droplet and add the proper domain.
I’ll go for the second choice in you don’t have anything else on that Droplet. I mean it’s not a problem to delete the current one and just create a new one.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.