Jump to content

Wordpress and deleted logfiles. How to recover.


Espen

Recommended Posts

A friend of me asks me to help him with his Wordpress site. He has deleted some files in the log directory. I dont know which files or how many. Tips and how to recover the system is appreciated.

I think the database is ok. So, wouldn't it be possible to deactivate and reactivate Wordpress on the hosting company's control panel/server and then upload a database backup?

Link to comment
Share on other sites

They're log files? Is it important to recover them? Since they are just, you know, logs...

Files are files. Any sort of file recovery thing appropriate for that OS and/or filesystem would work, but those tend to need low-level disk access. Did you try asking the hosting provider if they can do anything?

Link to comment
Share on other sites

I dont know Wordpress so well. I was wondering about the same as you. This is only log files, but I think she have deleted some other important files to.

The site is down. Is it posible to recover it as I was asking in my first post?

 

Link to comment
Share on other sites

I have no idea what your hosting provider offers; if you/she uploaded the original files then you should be able to upload those files again, or if the hosting provider set up WP then they should be able to do that again.

Finding out what was deleted would be really helpful - for you. Find out what files you're supposed to have, perhaps by setting up WP somewhere, and compare with the site to see what's missing.

A bit more drawn out process will be to find and read whatever error messages are being created (because WP won't be just "down" without saying why) and use that as a clue. Perhaps some of those messages will be talking about trying to use files that don't exist...

Link to comment
Share on other sites

No, log file deletion is not going to bring down Wordpress.  Logs are logs, and intrinsically disposable.  Most get "rotated" aka archived and deleted on a rotating schedule.

A required config file getting deleted might also crash the server, but it doesn't sound like that's the problem.

What's possible is that what got deleted were MySQL or MariaDB log files, so now the server is crashed.   You stated you think the database is fine, but I question that assumption.   The assumption could easily be verified using the cli mysql client, or perhaps a phpMyAdmin setup or something similar if the control panel has that, or it's installed somewhere on the server.

It's possible that an expert MySQL dba could find a way to get a MySQL server running again, after something so catastrophic as the deletion of required InnoDB logs, but more than likely you will need to reinstall mysql, and recreate the database(s) from mysql backups/dumps.   There are different ways to configure the InnoDB server, so there's not one cut and dried prescription for how one might approach a problem like this.

If there's no backup, well then --- it's very likely there's no "recovery" option.  In general "recovery" is facilitated by database log files, and is designed to recover from issues that happen outside the log files.  These are more accurately referred to as "transaction logs" and should the server crash, these logs are used to rebuild the database and recover it to the most recent transactions, which usually happens automagically when the mysql server is restarted.  

You're just asking us to guess, but that's a reasonable one for you given the limited information available to us.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.