How to Move All in One SEO Values into Thesis
A while back I found a great article on how to move your All in One SEO values into your Thesis fields. The reason it’s a great idea is because Thesis already comes with many (not all) of the fields the All in One SEO plugin adds. While the Thesis theme allows you to use the All in One SEO plugin alongside Thesis, migrating your old SEO meta values into the Thesis fields allows you to shut down and uninstall the All in One SEO plugin, thus reducing your blog’s footprint on your server.
While the article I found did a great job explaining how to go about this process for someone familiar with MySQL and running SQL queries, while talking about the method with a few other bloggers I discovered it wasn’t quite clear enough for someone who has never run a SQL query. So without further ado, here’s my attempt at showing the process from step 1 to done.
Backup Your Database
Before we begin, it’s an absolute must that you backup your database. While this query is relatively straightforward and has caused zero issues for me, it’s always a good idea to backup your database before making changes, just in case. While you can use phpMyAdmin or a command line to backup your database, I highly recommend you install the WP-DB-Backup plugin instead, (along with the other eight essential plugins on this list).
Once you install the plugin, go to Tools –> Backup in your WordPress Dashboard. In there you’ll come across a screen that looks similar to this:
Basically, the fields on the left are directly related to your core WordPress database fields. They’re the most important parts of the database to backup, as they contain your posts, users, comments and other data. The fields on the right are for your plugins and can be left unchecked. If you decide to include the fields on the right, your database backup file may quickly escalate in size.
For our purposes, I would check off all the fields, then scroll down and create a master backup copy. Afterwards, it would be a good idea to uncheck all those fields and set up daily automatic backups to be sent to via e-mail for your WordPress fields. I would also ensure the spam comments and post revisions boxes are checked off, as excluding them may greatly reduce the size of the database file.
Running the SQL Query
So you’ve got a backup of your database, now we can go about migrating all your All in One SEO values into the Thesis theme fields so we can safely uninstall the plugin.
Depending on who your web host is, you will be able to access your server via cPanel (Bluehost, A Small Orange and many, many other web hosts) or via Plesk (Media Temple) or another piece of software. These instructions will cover cPanel and Plesk as they’re the two most popular forms of server administration software, but the instructions can be easily applied to other web hosts. I’m going to skip over accessing your server via the command line and assume that if you’re rocking and rolling with the command line, you likely already know how to run a SQL query. If not, leave a comment or try Googling it!
Log into your web server.
Once logged in, look for a piece of software called phpMyAdmin. In cPanel, it should be on the first page after you log in. In Plesk, it’s a few pages in. If you’re using a different piece of software, try looking for phpMyAdmin under a Database(s) Section or a something along the lines of “access your database via the web”.
So in Plesk, you’ll want to click on:
Domains –> yourdomainname.com –> Databases –> Your Database Name –>DB WebAdmin
Once you’re in phpMyAdmin, look at the left sidebar. You should see a link at the top with your database name followed by parenthesis with a number (this number represents how many fields you have in your database).
Click the link with your database name.
Doing so will bring you to a screen with a navigation bar that looks like this:
Browse to SQL Tab
See the second tab that has the text “SQL” on it? Click that SQL tab.
You’ll arrive at a window with a big blank box in the middle that should look very similar to this screenshot:
That big blank box is where we’ll be entering our SQL query. So far so good? If I lost you at any point in this tutorial, leave me a comment and let me know!
Copy, Paste, Go!
Update: As Russell from Power Blog Service notes, the code is now slightly different depending on which version of All in One SEO you’re using.
For all versions of All in One SEO prior to version 1.6:
Copy the below text, starting from “insert wp_postmeta”, all the way to “‘title’,’description’,’keywords’);”:
insert wp_postmeta (post_id,meta_key,meta_value) select post_id, concat('thesis_',meta_key),meta_value from wp_postmeta where meta_key in ('title','description','keywords');
For all versions of All in One SEO starting from version 1.6:
Copy the below text, starting from “insert wp_postmeta”, all the way to “‘title’,’description’,’keywords’);”:
insert wp_postmeta (post_id,meta_key,meta_value) select post_id, concat('thesis_', substring(meta_key,10)), meta_value from wp_postmeta where meta_key in ('_aioseop_title','_aioseop_description','_aioseop_keywords');
Code for version 1.6 and after from Thesis Users : How To Remove All In One SEO Pack.
If for any reason you can’t see the text above or the characters come out funky, here is the SEO Thesis SQL query in a plain text file. This query assumes that you have not changed the default naming structure of your WordPress database fields. You can check by looking in the left sidebar. If you see a table called wp_postmeta, you’re all set. If your tables look slightly different (say wp_extrawords_postmeta), you’ll need to adjust the text above to add in the extra characters.
Copy the text of that SQL query, either from the text on this blog or from the plain text file. Paste it into your SQL query window. Hit go. You may need to wait while the database goes and copies the values from the All in One SEO fields into the Thesis fields.
Once it completes, you will see a new screen pop up that states that the query made X changes. At this point, you should be all set and ready to un-install the All in One SEO plugin. Personally, I would make one last check via your WordPress admin panel. Find an old post that had All in One SEO values and make sure those values are now listed in the Thesis SEO fields. If so, go ahead and un-install the plugin and enjoy your slightly faster site!
Thanks to How to Create a Blog for their superb tutorial, which was the basis of this tutorial.
Tags: All in One SEO, mysql, plugins, SEO, Thesis Theme, wordpress
Migrate All in One SEO Values into the Thesis Theme SEO Fields …: By running a simple SQL query, you can move .. http://bit.ly/zsfB9
This comment was originally posted on Twitter
Migrate All in One SEO Values into the Thesis Theme SEO Fields … http://bit.ly/14Debp
This comment was originally posted on Twitter
[…] is the original: Migrate All in One SEO Values into the Thesis Theme SEO Fields … Categories: SEO, SEO Tips and […]
[…] Using a MySQL tool, perform the following updates to your MySQL WordPress database. Please take a backup first in case of errors. If you are unsure about how to access MySQL please read this helpful article. […]
thank you so much! it wasn’t difficult at all and i’m no techie.
I’m interested in seeing moving values the other way. So from Thesis SEO fields to AIO SEO fields. Thesis is great, but for some sites, I’m thinking of taking Thesis off, so your help would be greatly appreciated. 🙂
I’ll try to give it a trial run later but if you have a backup of the database, all you need to do is switch around the values on lines 2 and 3 so that you’re selecting the All in One fields and inserting from the Thesis fields.
But when I click on append site name in title then I get site name twice in title???
Thankyou. For someone who had no clue where the SQL database even was, very clear and easy.
Thanks for the post it was really worth reading.
Regards.
You saved my day!!
Thanks a lot to you. You said ‘wait for it to copy all the DB Meta stuff to Thesis’, lol I thought I can have a coffee, but it didn’t take even 1 second for my over 1000 posts
nice site I like and I sure to visit, well done. Thanks for providing such a great resource about seo.
If i want to migrate thesis thêm seo fields in to the All in one seo values, what can i do?
Great tut! That’s what I needed.
Thesis is really a nice wordpress theme but it takes a lot of time to cusomtomize
Thanks for the post it was really worth reading.
Regards. Thesis is really a nice wordpress theme.
Thanks, had some doubts on where to look at CPanel, but now it’s all good. Appreciated.
Great article and just what I was looking for. BUT I found the place for the query but it didn’t like it.. it’s an “error in the SQL syntax for the server installation” . I have a screen shot of the failed effort. Help?
THanks
You made this so much easier. Thanks a lot.