I inherited a site that was compromised (I'm not sure what version of wordpress, the crash happened last summer). I have CLI access, and can SFTP into the server. The only thing I want to get is the content of the blogs. I was able to see the mysql files from SFTP, but they are just the .frm files. What is the best way to get this content?
All of WP's blog content is in the database that is used by the blog. The database name is found in the wp-config.php file.
You could do a fresh WP install in a new folder (or new host or new local WP instance), then change the wp-config.php file for the old database : database name, user, password. That won't copy over all of your themes/plugins, although any theme/plugin data stored in the wp-config table will be there if you install/activate the theme.
All of the posts are in the wp-posts table (as well as pages and media), but it's a bit complex to extract posts from the wp-posts table.
If you want to see the site's posts/pages, then the above procedure will get you started.
What I ended up doing since I had Mysql/SFTP access, was:
- create a dump using these instructions: here
- get the .sql file using cyberduck(newest version of mac conflicts with filezilla)
- open a local mysql workbench
- Run the .sql file
- using a select, get the blog info I needed