Page 1 of 1

Disaster: Deleted XAMPP, how to get back my backup Wordpress

PostPosted: 10. May 2016 16:08
by afindcom
Hi there.

I uninstalled XAMPP and accedently deleted the htdocs folder as well. My question is, I have a backup of the whole folder including the installation of a site I am developing in Wordpress. How can I "copy" all the WordPress info back into the new XAMPP installation.

I copied all the plugins and themes, that was easy. Images in the 'Uploads' folder is a problem as the WordPress installation does not recognize the new copied images.

Where is the data of all my pages and posts so I can copy them over, or is this not possible

I hope someone can help me with my disaster.

Thanks

Antonius

Re: Disaster: Deleted XAMPP, how to get back my backup Wordp

PostPosted: 10. May 2016 16:52
by Nobbie
The htdocs folder is not that important, it contains (mostly) the wordpress scripts, which can easily be retrieved by a new installation. BUT: some contents like Pictures are stored in an Upload Folder, these are lost, if you dont have a backup.

By far most important is the MySQL data folder, as it contains all MySQL Databases und WordPress puts all contents (all your menus, your sites etc.pp.) into MySQL Databases. If you have a backup of that data folder, everything should be fine. If you dont have a backup, it is a disaster. There is no way to retrieve that data without having a backup.

Images in the 'Uploads' folder is a problem as the WordPress installation does not recognize the new copied images.


Exactly as i told above.

Where is the data of all my pages and posts so I can copy them over, or is this not possible


See above, your data had been stored in MySQL Databases, which are placed in the data folder of MySQL (i.e. c:/xampp/mysql/data). If you deleted this folder, there is no way back.

I have a backup of the whole folder including the installation of a site I am developing in Wordpress.


Of which "whole folder"? If you have a backup of c:/xampp, everything is fine, If you only have a backup of the htdocs folder and or the wordpress folder, nothing is fine.


If you have a copy of the MySQL data folder, stop Apache and MySQL, rename the original data folder to somewhat else (for example rename it to data-original), then copy the whole "old" data folder from your backup to the the Xampp installation. If you are lucky, this already restores all your WordPress data and links (for the uploaded pictures etc.).

Re: Disaster: Deleted XAMPP, how to get back my backup Wordp

PostPosted: 11. May 2016 07:53
by afindcom
Thank you for the reply.

I have a backup of the whole D:\XAMPP folder and all sub-folders. I do a backup every day. So the MySQL folder and htdocs etc are all up to date.

Which folders should I copy over to the new XAMPP installation?
XAMPP/htdocs/wordpress...
XAMPP/mysql....

Regards

Anton

Re: Disaster: Deleted XAMPP, how to get back my backup Wordp

PostPosted: 11. May 2016 11:27
by Nobbie
afindcom wrote:Which folders should I copy over to the new XAMPP installation?


XAMPP/htdocs/wordpress
XAMPP/mysql/data

Keep in mind, that there is already a data folder in mysql, rename it before you copy the old one. Copy all subfolders as well (not only plain files), you need the whole structure.

If this does not work, you should undo the whole new Xampp installation. Restore the whole Xampp folder, open PhpMyadmin and run an export on the WordPress database. That is the way how to do it correctly. Also you SHOULD NOT install a newer Xampp, if there is no reason for that. It is a hard task to export/import all projects (like WordPress etc.) from one server environment to another, only if there is a severe error in your environment, you may try an update. But dont do it without reason, never change a running system.

Re: Disaster: Deleted XAMPP, how to get back my backup Wordp

PostPosted: 12. May 2016 07:49
by dDesign
You also had to try to recover the XAMPP folder from an older date