Fall Sale! Code FALL2024 takes 25% OFF our Pro Plugins & Books »
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 »

Conclusion

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!

Cheers!

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 “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.
Welcome
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 »
SAC Pro: Unlimited chats.
Thoughts
I disabled AI in Google search results. It was making me lazy.
Went out walking today and soaked up some sunshine. It felt good.
I have an original box/packaging for 2010 iMac if anyone wants it free let me know.
Always ask AI to cite its sources. Also: “The Web” is not a valid answer.
All free plugins updated and ready for WP 6.6 dropping next week. Pro plugin updates in the works also complete :)
99% of video thumbnail/previews are pure cringe. Goofy faces = Clickbait.
RIP ICQ
Newsletter
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.