Fix data loss after migration from V1
If you experienced a data loss from V1 after migration follow this guide.
Before applying the fix it is recommended to backup your DB
Data loss in option page fields
The persisting strategies of V1 and V2 are slightly different.
Suppose you have a field email
inside a box called box
associated with a page having new-page
as slug.
In v1 the meta field is saved with this name:
In v2 instead, the field is saved with this name:
This is because in V2 a meta field can be shared between several pages.
How to restore the data
You need access to your DB.
You can use PHPMyAdmin, or this plugin instead.
If you don't see the option page meta fields, they are saved with the wrong key.
Launch this query (use the correct WordPress tables prefix) to seek the data saved in box
:
If you don't have records from the previous query, launch this one:
In both cases, you need to restore option_name
to the right name.
Launch this query to fix the field if you got results from the first query;
Instead, launch this query if you got results from the second query:
Now the data inside box
should be restored.
Check it out by launching this query:
You should finally see your data with the correct key.
Last updated