Fix data loss after migration from V1
If you experienced a data loss from V1 after migration follow this guide.
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 an option page whose slug is new-page.
In v1 the meta field is saved with this name:
box_emailIn v2 instead, the field is saved with this name:
new-page_box_emailThis 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:
SELECT * from wp_options where option_name LIKE 'box_%';If you don't have records from the previous query, launch this one:
SELECT * from wp_options where option_name LIKE 'new-page_new-page_box_%';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