Save 25% on Wizard’s SQL for WP w/ code: WIZARDSQL
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 = Fullstack Developer. Book Author. Teacher. Human Being.
The Tao of WordPress: Master the art of WordPress.

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

  1. Avatar photo
    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. Avatar photo
    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 »
Wizard’s SQL for WordPress: Over 300+ recipes! Check the Demo »
I try to make use of default functionality whenever possible. For everything.
Upgraded iMac to Ventura. Disabled "unsend mail" feature and found some (now) hidden wallpaper settings. Overall smooth upgrade.
( $this ) is bloat. ($this) is better.
The Legend of Zelda: Tears of the Kingdom coming May 12, 2023. Absolutely pumped.
Favorite thing for breakfast is a tall glass of cold water. Hits the spot every time.
Fall is my favorite season :)
Still a few days left before “Unlimited” pro licenses are no longer available.
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.