Welcome to the new design! Please report any bugs or issues, thanks :)
Web Dev + WordPress + Security

Transfer Autometa Data to All in One SEO

During my last redesign and site overhaul, I finally made the leap from WP 2.0 to 2.3. In the process of synchronizing data and removing unecessary plugins, I managed to replace several keyword- and meta-related plugins with the incredible All in One SEO Pack (AiOSEO). One of the plugins replaced by AiOSEO is Autometa, an otherwise very useful meta-keywords management tool. With AiOSEO installed, there is no need for Autometa.

Over the course of a year or so, Autometa had accumulated a significant number of meta keywords in its associated database table. Thus, to keep these keywords, I needed an effective way of transfering them from Autometa to AiOSEO. I definitely wanted to avoid having to manually re-enter the data.. — perhaps a direct database migration?

Fortunately, I am not the first person to blaze this trail, as I gladly discovered an excellent thread in the WordPress forums that provided the perfect solution. After successfully transferring my Autometa data into AiOSEO, I decided to share the technique in “official” tutorial format ;)

Step 0: Backup Data

Just a friendly neighborhood reminder to backup your data(base) before attempting any modification. ;)

Step 1: The Transfer

Log into phpMyAdmin and locate the WordPress database for your site. Next, open the “SQL” screen and enter the following search-and-replace query:

UPDATE wp_postmeta
SET meta_key=(
REPLACE (meta_key,

Upon execution, this database query renames all “autometa” fields to “keywords”. Both plugins use the same table, wp_postmeta, however, Autometa assigns its keyword data to the autometa field, while AiOSEO assigns its keyword data to the keywords field. Thus, by renaming all instances of “autometa” to “keywords”, we are effectively transferring our Autometa keywords to AiOSEO.

Step 2: Reformatting the Data

Now we are going to reformat the reassigned Autometa keywords for AiOSEO. Return to the “SQL” screen and enter the following query:

UPDATE wp_postmeta
SET meta_value=(
REPLACE (meta_value,
' ',
', '))
WHERE meta_key='keywords';

Upon execution, this query searches the meta_value column within the same table and replaces every blank space (" ") with a comma space (", ") for any entry with an associated “keywords” value in the “meta_key” column. Basically, we are ensuring that our recently transferred Autometa keywords are recognized as individual keywords when processed via AiOSEO.

Finally, to complete the data reformat, return to the “SQL” screen and enter the following query:

UPDATE wp_postmeta
SET meta_value=(
REPLACE (meta_value,
' '))
WHERE meta_key='keywords';

Here, we have completed the reformatting by replacing all dashes ("-") with spaces (" ") for any meta_value field with an associated “keywords” value in the “meta_key” column. This is important because Autometa uses dashes to denote spaces in keywords, whereas AiOSEO simply uses spaces. Thus, the net effect of the previous two queries ensures that your keywords look like this:

  • keyword
  • keyword two
  • keyword three
  • another fine keyword

..instead of this:

  • keyword
  • keyword-two
  • keyword-three
  • another-fine-keyword


Again, this is the method that I used to convert my existing Autometa keyword data into AiOSEO. The migration went very smoothly, and required no special modifications to anything before, during, or after the conversion process. Of course, if you are using a newer version of AiOSEO, you may not need to do anything, as the plugin supposedly automates the transfer process; however, this feature would not work for me, for whatever reason. In any case, for those that need it, this import/export method for Autometa/AiOSEO works great — just remember to to backup your data ;)

Shouts out: HUGE shouts out to mishko for taking the time to share this trick with the fellow WordPress peeps!


Jeff Starr
About the Author
Jeff Starr = Web Developer. Book Author. Secretly Important.
Digging Into WordPress: Take your WordPress skills to the next level.

2 responses to “Transfer Autometa Data to All in One SEO”

  1. John Kolbert 2008/02/15 10:05 pm

    Hey, thanks for the nice tutorial. I haven’t actually given this a try yet, but I have a question. In the SQL queries, “wp_postmeta” should reflect your WordPress table structure, correct? Some people change the default table prefix on their install, thus it should be “prefix_postmeta”, where prefix is the WordPress table prefix, right?

    Just thought that clarification could help someone who may have overlooked it.

  2. Jeff Starr
    Perishable 2008/02/17 8:44 am

    Good point, John — thanks for the reminder.. Very timely, too, I might add, as I am currently writing another article involving the WordPress database and will now not forget to include this important piece of information. – Cheers ;)

Comments are closed for this post. Something to add? Let me know.
Perishable Press is operated by Jeff Starr, a professional web developer and book author with two decades of experience. Here you will find posts about web development, WordPress, security, and more »
USP Pro: Unlimited front-end forms for user-submitted posts and more.
Playing the long game.
They have weaponized the idiots.
Good software never steals focus from the user. Even during startup.
After 10 years running my own business, I still manage schedules and tasks using old school post-it notes, sometimes simple sometimes very elaborate.
You know those sites, where you're trying to just grab a quick bit of information but the page is shifting all over the place as it loads up 3 million advertisements.
Selling two of my top WordPress domains, wp-zen.com & zen-wp.com $300 for both. Aged 9 years. Drop a line if interested.
Never force your users to type out a password (or any long string of characters) by blocking the paste function. Typing long strings leads to MORE errors than simple copy/paste.