UPDATE: Starting v7.3.0, you can configure this add-on to import by slugs instead of IDs. You can skip the process detailed below. Learn more about this update.
This document describes the process of importing your old SEO meta titles and descriptions from your old site to your newly-rebuilt site.
Working on large, older sites, it’s not uncommon to realise that the website you’re working on could increasingly becoming a total mess content-wise. With so many promotional landing pages being created overtime, your website could potentially hosts competing pages with identical contents which might confuse Google.
Now, if rebuilding the website from scratch is the most sensible thing to do and you want to re-use your old SEO meta titles and descriptions from key, high-ranking pages, then, fret not as Smart SEO CSV Import/Export lets you do that really easily. Here’s how:
What you need:
- Admin access to old site
- Admin access to new site
- Smart SEO CSV Import/Export plugin (should be installed on both old and new site)
Importing old SEO meta data from old site to new site thru CSV import
- Login to your OLD site as admin and export your SEO meta data using Smart SEO CSV Import/Export. Open the exported CSV file with Google Sheet (you may name the sheet as oldsite.csv)
- Login to your NEW site and redo the step 1 above. Open the exported CSV file with Google Sheet (you may name the sheet as newsite.csv).
At this point, you might be tempted to import the CSV you downloaded from OLD site to your NEW site. Unfortunately, you can’t do that right away because the page IDs on your new site will be different from old site as a result of site rebuild. Example: your /blog/ page on OLD site may have 919 as ID whereas in NEW site it has 5 as ID.
- Since we’re going to reuse SEO meta titles and descriptions from OLD site, all we need to do is just edit the oldsite.csv and give post_id column the correct set of IDs.Of course, we don’t want to do it one by one manually. The easiest method for me is to create a new_id column inside oldsite.csv sheet, as seen below:
- We will then populate new_id column using VLOOKUP and search through newsite.csv and look for the correct, new IDs using post_slug as search key.Why post_slug as search key? That’s because both oldsite.csv and newsite.csv share the same post_slug column values. So, that makes it easier for us to do database search rather than manually checking it ourselves.But before we proceed with VLOOKUP, let’s alter newsite.csv a bit and just move post_slug column at the first column, as seen below:
- Navigate back to oldsite.csv and in B2, being the first Cell you need to update, write the following VLOOKUP statement:
=VLOOKUP(F2,IMPORTRANGE("GOOGLE_SHEET_FULL_URL", "newsite!A2:E99"),2, false)
Notice we’re importing newsite.csv with cell range as our datasource.It should magically grab the correct page ID from newsite.csv. You can just copy B2 cell all the way down to the bottom to do the same VLOOKUP to other pages. Once done, you may notice VLOOKUP returns #N/A errors.
What that means is that those pages are no longer being published in newly rebuild site. So, in your oldsite.csv, you can just remove those #N/A rows.
- Inside your oldsite.csv, remove post_id column. And then rename new_id column to post_id. And now you’re ready to import oldsite.csv to your NEW site using Smart SEO CSV Import/Export.
Check out our demo Google Sheet file to see things in action. If you need help copying your old SEO meta data to your newly-rebuilt site, don’t hesitate to get in touch.
SEE ALSO: How To: Bulk Edit Custom Fields via CSV in WordPress