After migrating wordpress to a new domain, URL redirects to previous domain. Can't access backend or phpmyadmin - Openlitespeed droplet

November 4, 2019 270 views
WordPress One-Click Install Apps MySQL PHP

Usually if I was stuck, I would make the change by changing wp_options table in phpmyadmin. But I cannot access it because phpmyadmin was on the domain.

  1. Can someone show what could be done to get to the new domain through SSH, hopefully or some other way?

  2. Also, for Openlitespeed droplet, any idea how to access file manager other than SSH?

Thanks in advance.

2 Answers

HI @notslow,

It seems you’ll indeed need to change the settings from your database.

For your first question, I have two suggestions.

ssh root@IpOfYourDroplet
mysql
use databasename;
select * from wp_options;

Once you are sure, you are in the right database, you can perform your update query and change your website’s address

UPDATE `table_name` SET `column_name` = `new_value' [WHERE condition];

Regarding your second question, if you wish to have a GUI, you’ll need to install some kind of a web panel on your droplet otherwise, you’ll need to use SSH.

Regards,
KDSys

by Mark Drake
phpMyAdmin is an application that allows users to interact with MySQL databases through a web interface. This tutorial covers the process of installing and securing phpMyAdmin on an Ubuntu 18.04 server.

Hi @notslow,

You should still able to have the access to the IP with phpmyadmin url. Then change both siteurl and home values from table wp_options.

If you want to update it from SSH console:
Login to the mysql and use the database, e.g. wordpress

update siteurl value by:

UPDATE `wp_options` SET `option_value` = 'http://example.com' WHERE `wp_options`.`option_id` = 1;

update home value by

UPDATE `wp_options` SET `option_value` = 'http://example.com' WHERE `wp_options`.`option_id` = 2;

Be sure to substitute the your domain for http://example.com

Best,
Eric

Have another answer? Share your knowledge.