Migrating from Posts Table Pro to Document Library Pro
If you are currently using Barn2's Posts Table Pro table plugin for your document library, then you may wish to migrate to our dedicated Document Library Pro plugin. This comes with all the layout options that you get with Posts Table Pro, along with extra document management features that you might benefit from.
This article provides instructions on how to migrate from Posts Table Pro to Document Library Pro. There are two methods, so choose the one that applies to you:
- I have created a custom post type (e.g. 'documents' or 'publications') which I am currently using to store my documents. Jump to instructions →
- I do not have a custom post type, and simply want to display files that are already stored in the WordPress Media Library. Jump to instructions →
Method #1 - Migrate a custom post type to Document Library Pro
Most people who use Posts Table Pro for their document libraries have created a custom post type to store the documents. For example, you might have done this using a custom post type plugin such as Pods or Custom Post Type UI. This would add a section called 'Documents', 'Publications', 'Newsletters' or similar to the left of the WordPress admin.
You might also have used a plugin such as Pods, Custom Post Type UI, Advanced Custom Fields or Toolset Types to create custom fields and taxonomies to store extra information about your documents.
To switch to Document Library Pro, you need to migrate your existing post type (and all its fields and data) to the
document_library post type created by the Document Library Pro plugin. The easiest way to do this is to export your document posts into a CSV file, and then upload them to the
document_library post type.
1. Export your documents
Use a plugin such as WP All Export Pro to export the data from your current post type to CSV.
Follow these instructions in order to prepare a CSV file for importing from WP All Export Pro.
- Navigate to wp-admin, then click on All Export > New Export from the main navigation on the left hand side.
- Click the Specific Post Type option and select your previously created post type in the dropdown.
- Click Customize Export File.
- You will now be presented with a main area to drag and drop your required fields for the export. The fields can be selected from the Available Data box on the right..
- ID, Title, and Content fields will be selected by default. The ID is not necessary for the Document Library Pro import and you can remove or ignore it.
- Drag the Excerpt field from the Standard area on the right into the main area on the left.
- You can choose and drag two existing taxonomies to migrate into the Document Library Pro categorry and tag taxonomies from the Taxonomies area on the right.
- If you use featured images then you can drag the Featured field from the Media > Image area on the right. After dropping it into the main area it will be labelled as Image Featured. Click on this field and a settings modal will open where you should ensure only the ‘Export featured image’ checkbox is checked and click Save.
- You can migrate your download link by dragging the custom field where you stored the URL from the Custom Field data area. If you used the Page Links To plugin for this then the custom field you are looking for is
- Drag any other custom fields you wish to migrate to the main area.
- You can click the Preview button to preview your CSV and make sure you have selected all the required fields.
- Next make sure the Export Type to is set to Spreadsheet and CSV File in the dropdown and click the Continue button.
- You can now click one of the Confirm & Run Export buttons to run the export.
- Once complete, click the link to download the CSV file for use in the Document Library Pro importer
2. Create the correct fields in Document Library Pro
Before importing your documents to the new post type, you must create all the required fields in Document Library Pro. For example, if you use the current post type to store the document title, description, featured image and a custom field called 'reference' then you need to create all these fields in Document Library Pro.
Make sure you add a field for each piece of information that you will be migrating. (Note: It doesn't matter whether the fields have the same name as your old post type because you will be mapping the old fields to the new one as part of the import.)
3. Prepare the CSV file and import it
Finally, follow these instructions to prepare the CSV file and upload it to Document Library Pro. If you followed the instructions for WP All Export Pro from Step 1 then you will not need to do any formatting.
Method #2 - Add Media Library files directly to the document library
If the documents that you wish to display are already in the WordPress Media Library, then you can convert them to documents straight away.