| | #1 |
| HyperActive Warrior War Room Member Join Date: 2009 Location: Maryland USA
Posts: 271
Thanks: 124
Thanked 21 Times in 20 Posts
|
I had to redo my WP site because some files got corrupted. So I did a fresh install of WP and imported my db. I have all the posts but for some reason the categories did not port over. They are all uncategorized. Has anyone got an idea on how to fix this? Please advise. |
|
Regards, Tony | |
| |
| | #2 |
| VIP Warrior War Room Member Join Date: 2008 Location: Montreal Canada
Posts: 2,390
Thanks: 1,017
Thanked 836 Times in 572 Posts
Blog Entries: 1 |
Hi Tony How did you "import" your data - did you use the WordPress Dashboard "Import" feature, or did you use a backup of your MySQL database? It may provide a clue to solving this mystery! Bill |
| |
| | #3 |
| HyperActive Warrior War Room Member Join Date: 2009 Location: Maryland USA
Posts: 271
Thanks: 124
Thanked 21 Times in 20 Posts
|
I used the backup feature of mysql database in the php admin area on cpanel.
|
|
Regards, Tony | |
| |
| | #4 |
| VIP Warrior War Room Member Join Date: 2008 Location: Montreal Canada
Posts: 2,390
Thanks: 1,017
Thanked 836 Times in 572 Posts
Blog Entries: 1 |
OK, that helps. Now lets go over how you did it, here is what I am assuming - please correct me if I am wrong: 1- You did a MySQL backup of the old site with PHPMyAdmin, and saved the .sql file locally. 2 - You rebuilt the new site from scratch (because of your "corrupted files" you chose not to do a file backup & restore). You included the same plugins and made absolutely sure that both WordPress and your theme & plugins were at the exact same version level, and that the plugins were configured identically to the original site. 3 - You crated a new, empty database on the new sites server and also created a database user with appropriate permissions. 4 - You used the .sql file you made in step 1 to populate the new database 5 - You edited your wp-config.php to point to the new database, instead of the one created when the new installation of WordPress was created. Again I just want to be sure that this is exactly how you did this - if not please tell me where I guessed wrong. Your categories are held in the wp_terms table in your database, so if the id numbers are off the only category that will be correct is "uncategorized". However I am at a loss to explain why they would be off, if indeed you created a brand new database and used the data your backed up to restore it? Bill |
| |
| The Following User Says Thank You to ereadergold For This Useful Post: |
| | #5 |
| Black Ninja Optimizer Join Date: 2011 Location: Las Vegas
Posts: 95
Thanks: 0
Thanked 9 Times in 8 Posts
|
Have you restore the whole configuration, ad-ons and widgets?
|
| | |
| |
| | #6 | |||||
| HyperActive Warrior War Room Member Join Date: 2009 Location: Maryland USA
Posts: 271
Thanks: 124
Thanked 21 Times in 20 Posts
|
OK, that helps. Now lets go over how you did it, here is what I am assuming - please correct me if I am wrong:
![]() Again I just want to be sure that this is exactly how you did this - if not please tell me where I guessed wrong. Your categories are held in the wp_terms table in your database, so if the id numbers are off the only category that will be correct is "uncategorized". However I am at a loss to explain why they would be off, if indeed you created a brand new database and used the data your backed up to restore it? Bill | |||||
|
Regards, Tony | ||||||
| |
| | #7 |
| VIP Warrior War Room Member Join Date: 2008 Location: Montreal Canada
Posts: 2,390
Thanks: 1,017
Thanked 836 Times in 572 Posts
Blog Entries: 1 |
Hi Tony OK, now it starts to make sense! I'm pretty sure that the way you did it failed to exactly replicate the MySQL database, specifically the wp_terms, wp_term_relationships and wp_term_taxonomy tables. Without those being replicated correctly you will suffer the exact problem you are having now. Steps 3, 4 & 5 are where you went wrong - step 2 was also not the best way to do things, but it wouldn't cause this particular problem (although you may run into some other ones). You may have to start from scratch with a build of the exact same version of WordPress, however as a possible "quick fix" you can try this first: 1- Use the MySQL Databases utility in your CPanel (not the MySQL Database Wizard!) and create a brand new database. Create a brand new database user. Then associate the user to the database, giving the user full permissions. Make note of the complete database name, user name and password. 2 - Use PHPMyAdmin and restore the .sql file you made with your backup utility to this new database. 3 - In the root of your WordPress directory make a backup of your wp-config.php file. Then edit the original wp-config.php file and replace the database name, username and password with the ones you saved in step 1. Save the changes. Now go to your WordPress site and see if it fixed it. If it didn't I think you will need to start from scratch, replicating the exact environment you had backed up first and them performing these steps. I believe the WordPress SVN repository has all the previous versions of WordPress available if you need them. Hope this helps. Bill |
| |
| The Following User Says Thank You to ereadergold For This Useful Post: |
| | #8 |
| HyperActive Warrior War Room Member Join Date: 2009 Location: Maryland USA
Posts: 271
Thanks: 124
Thanked 21 Times in 20 Posts
|
Bill, I'm glad you responded because I just did the exact thing you outlined in your inquiry for the previous post and where you also outlined in your latest post. I'm glad to report that your steps worked perfectly and I have all of my categories (and tags that were gone) back as they were. Thanks again so much. |
|
Regards, Tony | |
| |
|
| Bookmarks |
| Tags |
| categories, dissapeared |
| |