Restoring WordPress from backup – SitePoint

by

in

Hello Friends,
I have a 2.4 GB .wpress extension backup file, all that’s left from a site whose database got lost a few month ago. Do I have any chance to restore it?
I made it through WordPress dashboard but I cannot remember which tool I used.
Any clue on how to recover it?
Thanks
update: it seems I used All-in-One WP Migration. Problem is this plugin has a 40 MB upload limit therefore I would have to unpack it manually.
…Done with an handy tool called Traktor.
Now I am left with the following
image
Cannot figure out what to do with these. It appears to be what goes into wp-content folder in the db.
Well I am not that familiar with WordPress and certainly not your plugin. But I know usually WordPress backups are basically in two parts. WordPress system and the database. I would guess most of these folders are the WordPress system and would need to be copied into a working system (but not a live system). I would start looking at the database.sql file and the contents of the backups-jmr95 folder
Well I am not that familiar with WordPress
So am I :sweat_smile:
I guess I will stat coping and pasting those folders in the current db and see what happen.
Thanks
You should not really paste anything into a db, the folders would be part of WordPress. You need to create a db and use the sql to import data into it. Copying and pasting files into a db can break it and probably will
I would start with a fresh wordpress install and look first at importing your sql into the db it creates. You can deal with plugins etc later. I would concentrate on getting the data back into WP first
You can do this with phpmyadmin and use the same to view the database structure and access the contents using the parameters in wp-config
.wpress is backup file of all in one wp migrate plugin
I would start with a fresh wordpress install
Thanks @kerry14 this is a good starting point, given I do not have much experience on the subject.
You should not really paste anything into a db
I would just experiment on an expendable local version. Not high hopes anyway…
You can do this with phpmyadmin
Very useful lead for some homework. More details will be greatly appreciated, If you have the chance of course.
I’m retired mate, got to keep my wife and dog happy, in that order usually but apart from that it’s mostly Nat Geo and The Food Network!
If there is any way I can get a look at any of your files I may be able to help more. I’m OK to help out but my times are different since I live in Egypt, internet is ‘temperamental’ but I did start to write my own backup restore for WordPress in PHP so I’m familiar with the concepts.
One thing you must understand is generally speaking you literally can’t just paste a file into a MtSQL / MariaDB database. you cant even simply add another database or table that way. Everything needs to be imported using SQL or created via something like phpmyadmin.
Start with a new ‘expendable’ WordPress setup, try and identify the theme and any plugins that were being used and add them. Then look at the SQL files you have and then try importing the SQL using phpmyadmin
If you have any other questions just ask, I’ll reply and help when I can
Do you understand how WordPress actually works, examining the database, viewing the different tables etc?
That is very kind of you. I am based in Sicily (still North Africa) we are not that far apart.
you literally can’t just paste a file into a MtSQ
No worries I wasn’t really expecting to solve that so easily.
Do you understand how WordPress actually works, examining the database, viewing the different tables etc?
I’ve never dabbled with databases, SQL and the likes but I do understand the principles. I’ll be proceeding one step at a time.
How can I show you my files?
Update:
After a flash check
Phpmyadmin can import compressed (gzip, zip) or uncompressed files. I guess I have to understand what to do with the .wpress file. I guess it is somehow compressed.
As said earlier it doesn’t seem to be a clone of a entire database.
Also, I read phpmyadmin may have some problem with large files, is 2.4 GB considered as large?
try and identify the theme and any plugins that were being used and add them
The folder plugin and themes lists most of what was installed. Most of them are free, the theme unfortunately is not. Do I have to buy it back?
I think the problem regarding large files is a PHP limitation and I think it can be overwritten in the config on the server if you have access.
I don’t know about themes but I believe some plugins modify the database so depending on the sql you may end up trying to update a table that does not exist. But no point in buying the theme at this stage unless you really need to.
I really think that your best approach is to extract any sql and see what it actually consists of, if it creates tables and if so which ones. But once you have valid sql you actually have useable data to play with… and yea, with files of that size I’m not really going to be able to view them easily but start by unravelling the sql to see what you are dealing with.
The other problem you may hit is that if the backup was created by a plugin, it may not be in raw sql format and you may need the plugin to extract the data again, so as satishinnovstudio said you may need to get hold of all in one wp migrate
Well, let’s begin with the sql (hope is the right one).
database.zip (4.4 MB)
The other problem you may hit is that if the backup was created by a plugin, it may not be in raw sql format
If this is the case, I found out that some previous version of All-in-One WP allows to import up to 512 MB (the current release 40 MB only). Maybe is possible to split the backup in several parts or prioritize the essential?
Update:
@kerry14 have a look at this, I had overlooked it before, but after your explanation I went back checking all sources and that seems to be close to what I need. They indeed say
” rename the folder to “wp-content ”, delete the one from the new WordPress you install, and then just move it there. Lastly, you need to clean the new WordPress database and import the SQL you got from the “wpress ” archive.”
Well if you look at the code there are comments at the beginning which may assist –
then the code is in a number of sections, each of which deletes a table if it already exists and then creates a new one –
Then the SQL continues by inserting data into the newly created empty table row by row –
The ‘SERVMASK_PREFIX’ is probably a universal prefix that gets applied to all tables. WordPress usually gives you the option to ad a prefix to all tables or it could have been defined elsewhere, maybe in a plugin.
I notice further down in the SQL there are a number of tables containing within their name –
aioseo
A google search reveals the above link which is an SEO plugin for WordPress, so that certainly looks like this plugin was installed.
This would be the basis of your process, import the tables into your database and find out what each table is for. You may also need to reinstall your WordPress with the same table prefix so it finds the tables.
I tried importing the entire SQL but got a number of errors, so I tried breaking the SQL into individual create/insert sections. Some worked and created tables and rows, other gave errors.
So really now its detective work, importing what you can, viewing data, investigating errors and understanding what data you have and what it is used for.
I do think however that it is going to be a very long job importing the data, deciphering what the data is and what plugins and settings are needed to access it and you will basically be trying to create a WordPress install bit by bit. It may be easier to bite the bullet and by the plugin, but if you like solving problems you have many interesting and fun filled evenings ahead :slight_smile:
Thank you so much for having taken your time for this @kerry14 :pray:
Can you tell whether those errors upon SQL import where caused by missing plugins?
If that is the case I do have the (full?) list of plugins. They are in the plugins folder:

@kerry14 have a look at this, I had overlooked it before, but after your explanation I went back checking all sources and that seems to be close to what I need
Can you also let me know your opinion about the aforementioned guide? In short they say to switch wp-content folder with the one inside the backup and then to import the database. It seen too easy, what’s the catch?
By the way I have already extracted the .wpress backup file, here is what it’s inside:
image
Can you tell whether those errors upon SQL import where caused by missing plugins?
I tried importing into an empty MariaDB / MySQL database (the same as WordPress uses) but the database was created, and the import performed purely using phpmyadmin. So completely independent of WordPress or any Plugins. It was purely an error updating a database with that SQL. So purely a database / SQL error possibly due to version or database settings. Possibly may have more luck using a working (but expendable) WordPress install – but these were not ‘Wordpress’ or ‘Plugin’ errors on my attempt.
Those folders look very much like they belong in the WordPress wp-contents folder. but the database sql and possibly the contents of backups-Jmr95 would look like good candidates for database data.
The link you sent seems to be instructions employing a javascript server environment which is totally beyond me. As we progress, seeing the comments they make about the original plugin, I think getting a full restore is going to be an uphill struggle and more of an adventure in discovery and learning :slight_smile:
I’ll give importing the database on a fresh WordPress install a shoot and let you know what happens.
The link you sent seems to be instructions employing a javascript server
Really? I thought they just said to copy and paste wp-content and then import the database thorough PHPMyAdmin/SSH.
I thought they just said to copy and paste wp-content and then import the database thorough PHPMyAdmin/SSH.
I did what they said out of curiosity. IT WORKED!!!
Just joking…
Swapping the wp_content was easy, for the database there are mathematical chances I messed up something.
After the database swapping I logged in but as soon as I did I was prompted to chose a language and register a new user as if it was a fresh installation. Done that I could access the dashboard where I found the list of all backed up plugins and themes (taken likely from wp_content) and nothing else.
What I did with the database was emptying the existing database folder and replace the content by importing the .sql file from the backed up site. One thing I immediately noticed is the imported database tabs prefix is different than the standard ( servmask_prefix_… rather than wp_…), could this be one issue?
I tried to change prefix in wp-config.php but that gives PR_END_OF_FILE_ERROR. I notice it tries to connect to the original domain instead of http://localhost/wordpress/wp-login.php
@kerry14 do you have any suggestion? I know, I opened the Pandora box…
I really admire who everyone is trying to find a way for the user. Here are my suggestions for you, hope could help. As you created a file by All-in-One WP Migration plugin you can restore your data backup by following a few steps:
By using the same plugin you can import the backup file but for that you have increased the upload limit to 2.4 GB. Try this by editing your php.ini file. Use a tool that can extract the backfile into a folder then upload your site via Control Panel. Also merge database.sql files into your site’s database using a tool like phpmyadmin etc. Hey and you can also try WPvivid Backup Pro3, simply install this plugin on your site and then upload the backup file.
tabs prefix is different than the standard ( servmask_prefix_… rather than wp_…), could this be one issue?
I understand that some plugins create their own tables and when they do so, they use there own prefix to differentiate them from the standard WordPress tables.
Thank you so much for your assistance @lara
Try this by editing your php.ini file.
Can you elaborate a bit more about it: Is it about increasing the upload limit to 2.4 GB or using a tool that can extract the backfile into a folder?
extract the backfile into a folder then upload your site via Control Pane
Do you mean like this
image
WPvivid Backup Pro3, simply install this plugin on your site and then upload the backup file.
You mean the backup made with All-in-One WP Migration plugin?
I understand that some plugins create their own tables and when they do so, they use there own prefix to differentiate them from the standard WordPress tables.
That seems to be the case.
Powered by Discourse, best viewed with JavaScript enabled

source


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Discover more from Wordpress supported for Telkom University

Subscribe now to keep reading and get access to the full archive.

Continue reading