By kiel
I changed my WP site url’s in the admin to point to our domain instead of our IP. I do not have phpmyadmin to make the edit to set it back to our IP. How can I get this done? I have a meeting soon, and now I can’t show my client their website. =(
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!
You are correct that an update to your MySQL database is needed to correct this and without phpmyadmin you will need to use the command line mysql client. The steps to update the default address are:
1.) Log into your droplet via ssh and get your root mysql password from the file /root/.my.cnf
cat /root/.my.cnf
2.) Use the following command to connect to your MySQL server from the command line client, entering the MySQL root password when prompted
mysql -uroot -p wordpress
3.) Now you can update your database with the correct url using the following queries, replacint [your ip] with your droplet’s IP address.
update wp_options set option_value = 'http://[your ip]' where option_name = 'siteurl';
update wp_options set option_value = 'http://[your ip]' where option_name = 'home';
Once you have done this your site should again be accessible.
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.