MYSQL wp post
- Started
- Last post
- 9 Responses
- Atkinson
I have no idea about mysql but I'm wondering whether this is possible:
I had an old WP blog which I deleted but still have the database. There is now a new [my] site on the same domain.
Is there a way of retrieving an old blog post text from the database? If so, how?!
- vaxorcist0
you have the database? if you used a default-like template, you should be able to just install a default wordpress, then re-import the database... note that you may have used an old version of WP, but after some wrangling, this should work.....
- idiots0
you have to import the database through your phpadmin screen. it's fairly straightforward.
- mantrakid0
if you connect a new installation of wordpress up to the old database after the old DB is imported via something like phpMyAdmin, you will likely get an "Upgrade Database" option when trying to view the /wp-admin side of your new wordpress installation. Upgrading the database will get it up to speed with the latest WP and will make your content visible in the new WP installation so you can do whatever you need to do from there.
- mantrakid0
just importing the database into phpmyadmin technically gives you the content though, as everything is housed in the wp_posts table. You just might have to do some digging/matching to other tables if you want to get relationships/categories/tags back etc.
- and keep in mind everything is in wp_posts. even trashed posts or drafts, etc. so sort by post_type or w/emantrakid
- Atkinson0
sorry, I mustn't have been clear enough. I don't want to reinstall the dtabase, I just need the content of one of the old posts - without reinstalling WP.
Is there a way in PHP admin to get the content of a post as clean text?
- idiots0
FYI, i just opened an exported database before i posted that suggestion. IMO, easier to dig through a file than go through all the import browse bs. 6 of 1 half a dozen of the other. Seeing as you know what you're looking for you'll easily be able to search the txt document for keywords
- vaxorcist0
NOTE: If you open your mySQL sql data dump in some text editors, it may switch all the quotes to "smart quotes" and you may have to switch them back.... use a programmer's file editor like notepad++