0

I have my Wordpress site installed on a root folder. Then I have a test subdirectory where I want to have a copy of my website. I did copy and move all of the files from my main website to the test directory. I have created a new database, a new user, imported the database from the main website into the new database and I have changed the wp_confing.php file in the test directory to use that new database. Everything seems to be ok but when I got to: mainwebsite.com/test/wp-admin and I try to log in, it just hangs there, I press on access and I get no error or anything, the password fields just resets but I don't get redirected so I cannot save my permalinks.

I suspect an error in the .htacces file, since its' the same from the main website, but then I deleted it and I still have the same problem.

1 Answer 1

2

If it's a standard WordPress .htaccess file that won't be your problem. I'm willing to bet you forgot to change the Site URL values when you imported the database.

You can either edit it in the options table in your database or even in your wp-config file by adding

define('WP_HOME', 'http://mainwebsite.com/test');
define('WP_SITEURL', 'http://mainwebsite.com/test');

to it. You can read more (or other ways to do it) here: https://codex.wordpress.org/Changing_The_Site_URL

2
  • Oh that was it! I forgot, thank you so much. Accepting when it allows me.
    – Sergi
    Commented Feb 27, 2018 at 23:24
  • We've all certainly been there, such a simple thing to forget in a migration. I'm glad to help!
    – Xhynk
    Commented Feb 28, 2018 at 0:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.