I made a backup for my clients site the other night, apparently after I made the backup they made a few posts. I then moved the site to another host and resetup wordpress and imported the database and backup files.

Now my question is, I still have access to the old host, I can login via FTP or cPanel, is there anyway I can grab the posts from the database possibly? In phpMyAdmin? Thing is I cant just login since the nameservers are changed.

Thanks, Matt

  • I'm going to suggest a very low tech solution because it's only three posts: go to google, grab the cached copy of your site, copy post content/titles/etc, paste into new site. Commented Dec 20, 2011 at 0:28

4 Answers 4


Scenario 1: AUTO First of all, you need to get full database from phpMyAdmin. Basics come with _posts and _postmeta, but you probably need full data with categories, taxonomies, comments etc. that may have been affected in 1 evening.

I would suggest to export WHOLE database to .sql file and then import it to new one. Nothing as easy as that.

Don't forget the attachments. Via cPanel you probably have access to file manager, if its Red-hat/Centos or similar server panel. Just grab the files from last date and re-upload to your new site via FTP.

Scenario 2: MANUAL If the blog is being updated and you can't afford to re-upload whole database, I suggest to open both phpMyAdmins at the same time and look for differences. Probably few lines in posts, then some lines where tags and categories are assigned, some lines in postsmeta table etc. Just be sure to sort both phpMyAdmins by the same column when comparing.


Sounds like you already know what you need to do.

You are correct that you probably won't be able to access (not easily at least) the wordpress admin panel from your old site. You could try a direct IP address or some hosts offer an alternative URL, which may work, but I wouldn't bank it.

So your suggestion of finding the newest posts via phpMyAdmin is your best, and probably easiest, bet. I'd just take the HTML from the post_content field of your wp_posts table and then input that into the new WP install via the WP Admin interface (not phpMyAdmin), unless your confident enough to swap out the whole table on the new server with the same table from the old server. I really wouldn't recommend that though, and would definitely back up the new host's database before doing anything that you couldn't fully restore.

The other trick though is to know what metadata was associated with the post. To peruse through the metadata for that table go to the wp_postmeta table and look for all entries with post_ids that match the post_id from wp_post field. There will probably be more than one for each entry.

Were there images attached?

You might do a google search for something along the lines of "wordpress migrating posts between databases" or something to that effect, if you still have questions.


If you have access via a direct IP address or an alternative URL you probably can make the wp admin available again.

Open table 'options' in phpmyadmin. Look for the 2 rows where the field 'option_name' contains the value 'home' or 'siteurl'. They should contain as 'option_value' the start URL of your old installation. Change this to the direct IP or the alternative URL and save.

Now you should be able to open the admin again.


Thanks, what I ended up doing was dumping all the tables in the POSTS section within phpMyAdmin then logged into the new server and imported it. Worked like a charm.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.