How to migrate your LearnPress database from one site to another with Sheet Editor

Migrating a LearnPress database is a complex task on it’s own. WP Sheet Editor makes this task easier by providing you with separate spreadsheets which you will have to export and import back on the new site. In this quick tutorial, we will guide you through so you can migrate your database in the fastest and most convenient way possible.

To perform this tutorial, you will need two of our plugins

You need these two plugins because LearnPress saves the information on regular post types and also on custom tables. For this example, we will give the name Site A to the site you are migrating from and the name Site B to the site you’re migrating to.

Also, you need to install the “WP Sheet Editor – LearnPress” extension

You can download the extension here:

This extension adds full compatibility between WP Sheet Editor and LearnPress.

Step 1: Set up the spreadsheet

When you install these 2 plugins and the extension, you will see different spreadsheets on the left side dashboard bar. If you don’t see any of the options marked in red on the below screenshot, go to WP Sheet Editor > Setup Spreadsheet > Choose the missing spreadsheet > Save > Save.

If you click Edit Custom Database Tables, you should be able to see the tables of the second screenshot too.

learnpress1

learnpress 2

Step 2: Export and import your courses and sections

A) Courses spreadsheet: On Site A, Go to WP Sheet Editor > Edit Courses > On the spreadsheet, click on Export > Click on “all columns” > Leave the software used to export empty > Export

You will get a file with all your courses information.

On Site B, go to WP Sheet Editor > Edit Courses > On the spreadsheet, click on Import, choose the file you previously exported from Site A and choose “import all columns” > Import all rows as new. You will now have all your courses from Site A on Site B, but they will have no sections or content, this is normal

Important note: You might notice that some of the columns from site A are missing on site B and there’s nothing to match them with, this is normal as the databases are different, but if you notice there are too many columns missing on Site B, we suggest you create a “dummy” course with all elements (sections, lessons, quizzes, etc) in order for learnpress to create those fields on site B and have columns to match them with automatically when importing.

B) Sections spreadsheet in Site A: Go to WP Sheet Editor > Edit Custom database tables > Edit WP Learnpress Sections > Export the file as you did with the last one.

The following is, in a way, the hardest part of all this process, because you have to do this manually. Since you are working with 2 different databases, the ID’s on each item are not going to be the same. For example, if on Site A your course ID was 123456 on Site B it could be 456789, we have no control over this as this is how WordPress works and we can’t assign the same ID from Site A.

As you might notice, the export file you got from this last step, has a field called Section Course ID which is the field that tells LearnPress which course does the section belong to. You will also notice that this column has the values from the old database; in order to import them correctly, you need to look for the ID’s of the new database and input them there.

So, for example, if on previous database the course “Mathematics 1” had the ID “1000” you have to check what ID was the course created in on Site B, and you do that by going to the courses spreadsheet on site B and looking at the first column on the left side, you will then see the new ID. You now need to replace the old ID on the Section Course ID.

Replace what you see on this screenshot with the new course ID on Site B

how-to-migrate-your-learnpress-database-from-one-site-to-another-with-sheet-editor

Note: If you have several courses, you need to make sure you’re replacing them correctly, otherwise you will end up in sections from one course on another one

On Site B: Go to WP Sheet Editor > Edit Custom database tables > Edit WP Learnpress Sections > click on Import, choose the file you previously exported from Site A, and choose “import all columns” > Import all rows as new.

If you have correctly followed the previous steps, then you should now have your courses with empty sections.

 

Do you need help?

You can receive instant help in the live chat during business hours, or you can contact us and we will help you via email.

Close