I am trying to restore a full backup created by ManageWP on my local PC to use the local version for testing. I went through different guides, but I could only get the website into a half-working state.
What I did so far:
- Installed XAMPP, started Apache and MySQL
- Created a "test" folder in "htdocs" and pasted all of the contents of the ManageWP’s zipped backup.
- Tried to open localhost/test in my browser -> doesn’t work, I get "Access denied" MySQL error for the user.
- Went to phpmyadmin -> Import, zipped the .sql file from the mwp_db folder and uploaded it -> doesn’t work, I get "#1046 – No database selected" for the query "DROP TABLE IF EXISTS
inmge_actionscheduler_actions
" - The "no database selected" issue was because I didn’t create and select a database to import the backup one into. I had to create a new database and select it on the left menu before going to Import.
- The import now failed because of timeout issues. I opened xampp/php/php.ini and increased the max_execution_time / max_input_time / memory_limit values. Also, I opened xampp/mysql/bin/my.ini and increased max_allowed_packet.
- The changes in 6) were not sufficient so I went and changed ExecTimeLimit to 0 in xampp/phpMyAdmin/libraries/config.default.php
- At this point the database was imported, but I had issues with the authentication. I had to add the exact user from wp-config.php to the database in phpMyAdmin and I had to name that database exactly the same.
- Now the database was successfully imported, but I still couldn’t open the website. I had to change the
siteurl
andhome
values in theinmge_options
table to localhost/test (via phpMyAdmin) - localhost/test now contained my homepage, but all other links would redirect to Xampp homepage. I had to add WP_HOME and WP_SITEURL values in my wp-config.php and now I could finally open localhost/test/wp-admin and access what I needed there.
After the 10th step, I managed to get the local website into a half-working state, where I can manually enter wp-admin, but any link on the actual website still forwards me back to XAMPP homepage.