Espen Posted May 24, 2023 Share Posted May 24, 2023 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? Quote Link to comment https://forums.phpfreaks.com/topic/316341-wordpress-and-deleted-logfiles-how-to-recover/ Share on other sites More sharing options...
requinix Posted May 24, 2023 Share Posted May 24, 2023 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? Quote Link to comment https://forums.phpfreaks.com/topic/316341-wordpress-and-deleted-logfiles-how-to-recover/#findComment-1608616 Share on other sites More sharing options...
Espen Posted May 24, 2023 Author Share Posted May 24, 2023 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? Â Quote Link to comment https://forums.phpfreaks.com/topic/316341-wordpress-and-deleted-logfiles-how-to-recover/#findComment-1608623 Share on other sites More sharing options...
requinix Posted May 24, 2023 Share Posted May 24, 2023 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... Quote Link to comment https://forums.phpfreaks.com/topic/316341-wordpress-and-deleted-logfiles-how-to-recover/#findComment-1608640 Share on other sites More sharing options...
gizmola Posted May 24, 2023 Share Posted May 24, 2023 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. Quote Link to comment https://forums.phpfreaks.com/topic/316341-wordpress-and-deleted-logfiles-how-to-recover/#findComment-1608647 Share on other sites More sharing options...
Espen Posted May 24, 2023 Author Share Posted May 24, 2023 I tell her to contact the hosting company (i think its host gator/never heard about them before) and ask them to recover it for her. There must be a backup somewhere, i think. Quote Link to comment https://forums.phpfreaks.com/topic/316341-wordpress-and-deleted-logfiles-how-to-recover/#findComment-1608651 Share on other sites More sharing options...
cyberRobot Posted May 25, 2023 Share Posted May 25, 2023 If it is HostGator, here is their backup policy:https://www.hostgator.com/help/article/backup-policy-do-you-provide-backups They also offer some alternative recovery advice here:https://www.hostgator.com/help/article/restoring-a-website-without-a-backup Quote Link to comment https://forums.phpfreaks.com/topic/316341-wordpress-and-deleted-logfiles-how-to-recover/#findComment-1608668 Share on other sites More sharing options...
Espen Posted May 28, 2023 Author Share Posted May 28, 2023 Thanks CyberRobot. She have been inContact with them now. Last thing I heard was they would fix this whit a backup fram the 27th April. Thats the day before all the problems starts to happen. Quote Link to comment https://forums.phpfreaks.com/topic/316341-wordpress-and-deleted-logfiles-how-to-recover/#findComment-1608700 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.