cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent Help Needed: Accidental File Deletion in Magento and Composer Issues

Urgent Help Needed: Accidental File Deletion in Magento and Composer Issues

Hi everyone,

I’m facing a serious problem with my Magento website, and I’d really appreciate any help or advice you can offer.

A few days ago, Liquidweb, my hosting deleted files from the main directory of my site (/home/wwwdos9/public_html/shopmami) instead of just clearing the cache files. The rm -rf command was mistakenly run on the main directory. Since then, the site has been throwing errors, specifically the following one: "Autoload error: Vendor autoload is not found. Please run 'composer install' under application root directory."

Unfortunately, the available automated backup was overwritten just before I realized the issue, so I don’t have a recent backup of the site. The hosting support team has tried to help me, but we haven’t had much success.

Here are some additional details about the environment:

  • Magento (unsure of the exact version).
  • VPS server with outdated OS and WHM (without support for some modern tools like Composer 2).
  • I’ve tried reinstalling Composer and fixing the autoload issue, but I’m getting errors related to authentication keys for Composer repositories.
  • I don’t have any other available backups on the server, although there might be some stored locally or in other development environments.

My questions are:

  1. Has anyone experienced something similar? Is there any way to restore or reconfigure Magento without a full backup?
  2. What critical Magento files should be in the main directory for the site to function properly?
  3. Any advice on how to deal with the Composer issue or how to install a functional version on an older server?
  4. If I can’t restore the site, is there any way to reinstall or rebuild the site using the existing files and databases?

I’m open to any suggestions or recommendations. I’m really stuck at this point and would greatly appreciate your help.

Thanks in advance!

6 REPLIES 6

Re: Urgent Help Needed: Accidental File Deletion in Magento and Composer Issues

Your code should always be versioned using tools such as Git. Do you have your codebase versioned in git?

Founder at https://agency418.com

Re: Urgent Help Needed: Accidental File Deletion in Magento and Composer Issues

No Smiley Sad

Re: Urgent Help Needed: Accidental File Deletion in Magento and Composer Issues

That is a big lesson learned then.

 

In this case, your best bet is backup. Without versioning the code, composer could rebuild vendor, but everything in your app/code is gone and who knows what you had there.

Founder at https://agency418.com

Re: Urgent Help Needed: Accidental File Deletion in Magento and Composer Issues

Everything is in app/code, not a single file has been lost.

Re: Urgent Help Needed: Accidental File Deletion in Magento and Composer Issues

I don't understand, didn't you say rm -rf was run on the main directory and no backup was available? How do you have the content of the app/code now? I don't really understand what you have and what you lost at this point Smiley Frustrated

Founder at https://agency418.com

Re: Urgent Help Needed: Accidental File Deletion in Magento and Composer Issues

Liquidweb, my hosting provider, was supposed to delete the cache, but instead, they mistakenly ran a deletion command on the root directory /home/wwwdos9/public_html/shopmami for a few seconds. After that, as if nothing had happened, they proceeded to delete the cache. At that time, I was asleep, and the backup made that day is from after the file deletion. The problem is that we don’t know exactly which files were deleted.