0

For a relaunched website I need to move the old wordpress site to an /archive subfolder. I reinstalled wordpress into that folder and the default blank wordpress worked fine.

Then I changed the database info in the wp-config.php to match the existing database and copied the old theme folder.

Now when I open up the page it shows the posts but none of the permalinks or the css works anymore and when I try to enter the admin panel it also gives me an error when browsing to /archive/wp-admin. I don’t really understand what the database has to do with that and how it can be fixed.

I also tried changing the db_version number in the database to the one thats saved inside /wp-includes/version.php but it didn’t help either.

If I refresh the admin panel when I update the wp-config to the correct db info I get the following error message:

No web page was found for the web address: https://www.domain.com/wp-admin/upgrade.php?_wp_http_referer=%2Farchive%2Fwp-admin%2F

The global php version on the server is 7.4 and the MySQL database is on version 5.6 so this should not be an issue.

Thank you very much!

1
  • did you migrate the old databases URL to the new URL? If so, what method did you use?
    – Tom J Nowell
    Commented Jun 17, 2021 at 17:24

1 Answer 1

1

Here is how I fixed it: Toms comment made me check how I could migrate the database URL without accessing the admin panel. Turns out it’s really easy. Go to phpMyAdmin and into your wp database. Go into the wp_options table and the first row should be the site url. Change it to the correct site (and subfolder). From then I could log into the admin panel and change permalinks and so on.

Thank you Tom!

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.