UpdraftPlus Home › Forums › Paid support forum – UpdraftPlus backup plugin › Migration/Restore – Upload backup files
- This topic has 6 replies, 2 voices, and was last updated 8 years, 4 months ago by Dee Nutbourne.
-
AuthorPosts
-
July 11, 2016 at 7:00 pm #163855Creekmore MarketingParticipant
Hello Updraft Plus,
in this case, a zip and database file were provided for migration. The zip file contains the entire WordPress installation as one would see in a file manager; we can zip the “theme”, “plugins”, “uploads” and upload them manually thanks to Updraft Plus’s ease of drag-and-drop – where would the “others” folder be located?
Thank you in advance!
M.July 12, 2016 at 5:54 pm #163983Dee NutbourneModeratorHi Michel,
The ‘others’ backup section consists of everything in the ‘wp-content’ directory that is not the uploads, plugins and themes.
If re-zipping a backup, you will need to match the UpdraftPlus naming pattern for the plugin to recognise the backups. This can be copied from an existing backup.
Best Wishes,
David NJuly 18, 2016 at 3:26 pm #164708Creekmore MarketingParticipantHello David Nutbourne,
thank you for your reply and the information.
As required, the folders have been re-zipped using naming pattern from a previous backup:
backup_2016-07-18-1219_caliconaples_89bd81abca04-db.zip (tried .gz too)
backup_2016-07-18-1219_caliconaples_89bd81abca04-uploads.zip
backup_2016-07-18-1219_caliconaples_89bd81abca04-themes.zip
backup_2016-07-18-1219_caliconaples_89bd81abca04-plugins.zip
backup_2016-07-18-1219_caliconaples_89bd81abca04-others.zipWhen attempting to restore, we received the following error: UpdraftPlus was unable to find the table prefix when scanning the database backup. We thought it may have been the “zip” extension of the databse, so we tried a “gz” version with the same result.
Is there a way to correct this?
July 18, 2016 at 5:57 pm #164736Dee NutbourneModeratorHi Michel,
‘.gz’ is the correct extension.
The error message that you are experiencing means that UpdraftPlus cannot find a record of the WordPress table prefix in the database backup. Apologies, I forgot that this would be an issue.
The best way to migrate in this case is:
- Restore the file backups via UpdraftPlus
- Manually restore the database backup via phpMyAdmin
If the original site had a different URL to the current site, you will then have to do the following:
- After restoring the database, add the following lines to your wp-config.php file, replacing the example URL with your new URL:
define('WP_SITEURL', 'https://example.com'); define('WP_HOME', WP_SITEURL);
- You will now be able to access WP Admin. Go to the UpdraftPlus Advanced Tools tab, and find the Search/Repace Database tool
- In ‘Search for’, enter the original site URL
- In ‘Replace with’, enter the new site URL
- Click ‘Go’
PLEASE NOTE, this performs a full search and replace operation on the database, and is not reversible. Please take extreme care when inputting the URLs.
After clicking Go, every instance of the old URL will be replaced by the new. You can then remove the extra lines from wp-configBest Wishes,
David NJuly 18, 2016 at 7:01 pm #164750Creekmore MarketingParticipantHello David Nutbourne,
No apologies necessary; thank you for the quick reply and added information. I followed your steps, and all went well until WordPress displayed a message to update the database; once I did so, I was unable to access the /wp-admin again.
Here are the detailed steps I have taken, in hopes you can clarify where I went wrong:
- upload and restore all backup archive zip files via UpdraftPlus; this resulted in a “You do not have sufficient permissions to access this page.” message, as expected
- updated the wp-config with the new url; this gave access to the wp-admin
- uploaded database via phpMyadmin; the original table prefix was different, so I renamed them to match the new table listed in the wp-config
- received a message on the front-end to update the database; did so and saw the “You do not have sufficient permissions to access this page.” again.
Was I only supposed to restore the database after the search and replace, or could there be another area (other than the wp-options table) where the siteurl may be listed?
July 19, 2016 at 5:03 am #164820Creekmore MarketingParticipantHello David Nutbourne,
I wanted to follow-up on my previous reply, and what I did differently that resulted in a successful restore:
- instead of renaming the database tables to the new database prefix generated by the fresh install, I reversed it and changed the prefix in the wp-config to match the original database prefix
- deleted/drop new tables generated by the fresh install
- updated the database when re-logging into the /wp-admin
- performed a search-and-replace with Updraft
- cleared the cache
I’m not certain why this method was successful vs using the new database prefix; speculating it could be due to serialized data contained within the database.
Hope this can be of help should anyone experience a similar situation!
July 19, 2016 at 6:26 pm #164895Dee NutbourneModeratorHi Michel,
The database prefix is also used in some database tables as part of the field names (e.g. in the options and usermeta tables). More information can be found on wpbeginner.com.
By changing the prefix in the database table names to match the new wp-config, these entries become broken. This is especially important in the case of the usermeta table, as some of these control user permissions.
When restoring the second time and changing the prefix in wp-config to match the database, the prefix matched throughout.
Best Wishes,
David N -
AuthorPosts
- The topic ‘Migration/Restore – Upload backup files’ is closed to new replies.