Super Plugin Sale! Your Choice: BOGO or 30% Off »
Web Dev + WordPress + Security

WordPress Plugins: 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, 'autometa', 'keywords'));

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
Working with the WordPress database? Check out my latest book, Wizard’s SQL Recipes for WordPress 🪄 Features over 300 recipes and an entire chapter on optimizing the WP database! Check out the PDF Demo and get the book »


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!


About the Author
Jeff Starr = Creative thinker. Passionate about free and open Web.
WP Themes In Depth: Build and sell awesome WordPress themes.

2 responses to “WordPress Plugins: 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. 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 »
Banhammer: Protect your WordPress site against threats.
Crazy that we’re almost halfway thru 2024.
I live right next door to the absolute loudest car in town. And the owner loves to drive it.
8G Firewall now out of beta testing, ready for use on production sites.
It's all about that ad revenue baby.
Note to self: encrypting 500 GB of data on my iMac takes around 8 hours.
Getting back into things after a bit of a break. Currently 7° F outside. Chillz.
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.