0

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?

  • If you have CLI access, can you use the mysql commands or WP CLI? – Tom J Nowell Oct 19 '19 at 19:49
  • i was able to get mysql access!! – Morgan Smith Oct 20 '19 at 18:14
0

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.

|improve this answer|||||
  • thanks! i was able to get a mysql dump and reload it that way – Morgan Smith Oct 20 '19 at 18:15
  • Glad to know you were successful. (Note that it is 'polite' to reward correct answers with a 'checkmark'. And that lets others know the answer to a similar problem.) – Rick Hellewell Oct 21 '19 at 2:03
  • Your answer wasn't the final soultion, but thank you for it, I'll post what I did. Thanks :) – Morgan Smith Oct 23 '19 at 17:07
0

What I ended up doing since I had Mysql/SFTP access, was:

  1. create a dump using these instructions: here
  2. get the .sql file using cyberduck(newest version of mac conflicts with filezilla)
  3. open a local mysql workbench
  4. Run the .sql file
  5. using a select, get the blog info I needed
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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