To restore or migrate a site you need to use the importbuddy.php file on the target site. This file is secured by a password. In case you don’t remember the password for importbuddy.php there are three options to recover it.
You can a) use importbuddy.php from another BackupBuddy installation or you can b) retrieve importbuddy.php and set a new password via iThemes Sync or c) you can manually edit the importbuddy.php file.
If you have BackupBuddy installed on a site you want to migrate or restore, you can either:
- Set a new default password for ImportBuddy via your wp-dashboard > BackupBuddy > Settings > General Settings.
- Once you have set this password, download a fresh copy of
importbuddy.phpvia wp-dashboard > BackupBuddy > Restore / Migrate (if using BackupBuddy 22.214.171.124 or earlier).
- Go straight to wp-dashboard > BackupBuddy > Restore / Migrate, click the “Download importbuddy.php” link and set a password to override the default password (if using BackupBuddy 126.96.36.199 or earlier).
- If using BackupBuddy 188.8.131.52 or newer, you can download an importbuddy.php file on the BackupBuddy -> Backups page in the upper right corner.
Since importbuddy.php files aren't connected to any specific site or backup file, you can use an importbuddy.php file from any site with BackupBuddy installed. You could even install BackupBuddy on a dummy site just for this purpose.
If you are using iThemes Sync, our WordPress site management plugin, you can set a new password for ImportBuddy when downloading importbuddy.php from the Sync dashboard for your site.
Navigate to your iThemes Sync dashboard, select the site that has BackupBuddy installed and select the BackupBuddy tab. Click the download icon, you can then override the default password and download importbuddy.php.
Editing the importbuddy.php file
Finally, if the above options are not available (for instance, if you have lost the entire site, and do not have access to the Sync dashboard), or you are not able to install BackupBuddy temporarily on a site, you can reset the password while running
importbuddy, and then edit the importbuddy.php file.
- Copy importbuddy.php to the location where you want to restore or migrate your site to.
- In your browser, navigate to the importbuddy.php file, e.g. mydomain.com/importbuddy.php
- Click the “Forgot Password?” button
- Enter and confirm your new password
- Make note of the following screen, or copy and paste the hashcode to a text editor first.
- Using a text editor (not a word processor such as MS Word) open the importbuddy.php file and locate the line that says:
define( 'PB_PASSWORD', '86bcecadd45110ce6edbc8e0110ce31f' ); // Update this portion with the hashed password to override a forgotten password.
- Replace the hash code, in this case:
‘86bcecadd45110ce6edbc8e0110ce31f’with the code you saved before, in this case:
‘2ee8cf7aec18e4607301846e95b262a6’and save the importbuddy.php file
- Navigate to mydomain.com/importbuddy.php again and enter your new password (and not the hashcode!) to proceed with the restore or migrate process.