How to I change WordPress URL on Ubuntu Droplet, but not lose my log-in

April 9, 2015 8.5k views
Ubuntu WordPress DigitalOcean

I am using a Droplet, Ubuntu Wordpress Single Install

Install goes great, change my WP admin log in without issues.
I have a domain registered through Google, that correctly points my domain to the droplet server IP address.

I can navigate my site, however any site other then the home page changes the url to http://ipaddress/page instead of Http://domain/page.

When I go to change both URL sites in the WP settings to the http//domain (instead of http://ipaddress. I lose the ability to log into the WP site as an administrator.

I have tried to use the VNC access to log in via phpmyadmin, or via the mysql server however i do not know the mysql root password, and since i did a WP install i can not find it in my message of the day. I can log in as a root into the ubuntu version, creat and add new users in the sudo group but never acess the mysql root

2 Answers

If you first ran through the WordPress installer after visiting via the IP address, you’ll need to update your WordPress settings to use the domain. Visit http://your.ip.address/wp-admin/options-general.php and update the values for WordPress Address (URL) and Site Address (URL)

WordPress settings

If you need to access the root MySql user, the password is stored in /root/.my.cnf

I have a related problem. I changed my wordpress address URL to be different from my Site Address URL.
Now both links don’t work and I can’t access the site in anyway

I can log into my server via ssh root however I need to know how to make the change through the command terminal.

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!