Yep, I typed my domain in wrong when installing WordPress on my droplet via SSH. I can’t get into wp-admin or anything because the IP address redirects there and takes me to URL not found.
How do I correct it?
(For the same reason, Let’s Encrypt SSL was not installed, which I would like solved too.)
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 @09215b4768b24d74ae4b11e85ca1d4,
You can do a couple of things here.
Update wp-config.php You can define your domain in your wp-config.php like so:
define( 'WP_HOME', 'http://domain.com' );
define( 'WP_SITEURL', ‘http://domain.com' );
Update database with wp-cli There is another way and it is to update your Database using wp-cli. WP-CLI is the command-line interface for WordPress. You can update plugins, configure multisite installations and much more, without using a web browser. To install it, you just need to run the following:
- curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
- php wp-cli.phar --info
- chmod +x wp-cli.phar
- sudo mv wp-cli.phar /usr/local/bin/wp
Once you have it installed, you can run the following command to change your WP_HOME And SITEURL
wp option update home 'http://domain.com'
wp option update siteurl 'http://domain.com'
Recreate your Droplet
You can also recreate your Droplet if the above tasks are too much for you.
Let’s Encrypt
Let’s encrypt can’t be installed if you don’t give a valid e-mail address.
Hi @09215b4768b24d74ae4b11e85ca1d4,
I assume that your droplet is working properly. If you can’t access to wordpress control panel, you can change the domain from the file wp-config.php, find these lines:
define( 'WP_HOME', 'http://yoursiteurl.com' );
define( 'WP_SITEURL', ‘http://yoursiteurl.com' );
Another option is to change the url from the database.
I hope that helps,
Sergio Turpín
Hello @09215b4768b24d74ae4b11e85ca1d4
You can also check this question which was previously posted here in our community.
I’ve posted an answer which you may find useful.
https://www.digitalocean.com/community/questions/change-url-in-wordpress
Regards
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.