Accidentally Updated Wordpress URL to Include SSL, Now Cannot Login

Hi there, I should have known better.

I accidentally updated the URL in the Wordpress admin prior to adding SSL to my droplet.

Now I cannot access any of the Wordpress backend.

How can I either revert the URL back to non HTTPS via SSH or another way?

Done a ton of research online, but ultimately have not been successful in accessing the WP CONFIG via SSH.

Any help is appreciated, thanks!

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.

Site Moderator
Site Moderator badge
January 15, 2023

Hi @lukebdcd5b91a1e99b537b20fd,

Before you make any changes, I’ll recommend creating a snapshot:

Once that is done and you have a backup, you can use 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.

First, to install WP-CLI:

curl -O
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp

Navigate to your WordPress directory

  1. cd /var/www/

where /var/www/ is the path to your website’s home directory. Once in there, create a DB backup running

wp db export

then do a test run

wp search-replace '' '' --dry-run

If everything looks good, you can run in without the --dry-run option:

wp search-replace '' '' 

Of course, remember to change with your own domain name.

Try DigitalOcean for free

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

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel
Get started for free

Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

New accounts only. By submitting your email you agree to our Privacy Policy.

© 2023 DigitalOcean, LLC.