Accidentally set up WordPress droplet with wrong domain

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.)

Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
March 15, 2023

Hi there,

In addition to what has already been mentioned, as this is a brand new WordPress installation and you still have not made any changes, an alternative approach here is to delete the Droplet and create a new one.



Site Moderator
Site Moderator badge
March 15, 2023

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.


Site Moderator
Site Moderator badge
March 15, 2023

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', '' );
define( 'WP_SITEURL', ‘' );

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:

  1. curl -O
  2. php wp-cli.phar --info
  3. chmod +x wp-cli.phar
  4. 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 ''
wp option update siteurl ''

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.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up