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

April 9, 2015 1.4k views
WordPress DigitalOcean Ubuntu

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

1 Answer

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

Have another answer? Share your knowledge.