2

I have been trying to clear space on my server (every little bit helps). I recently installed the FishPig extension and had no use for the Magefan_Blog module that was installed in my Magento 2 store.

I'm not exactly sure if Magefan_Blog comes with Magento 2.1.2 out of the box. However, I didn't need it. I tried uninstalling through CLI (command line), but I was only able to disable through command line with the magento module:disable command.

I then proceeded to delete the module and necessary table entries in the db, however I noticed that there were some files in media/magefan_blog/b/l/ that were no longer being used. There were only about 6, but like I said, I want to to clean everything.

Those image DID NOT show up when I installed the Shreeji Unusedimages extension, so it left me wondering, (if the Shreeji extension actually found unused images outside of the catalog) whether or not these images were still attached to something somewhere that could break my store in anyway.

Does anyone know if these images can be deleted without consequence? Again, I have already removed the Magefan_Blog module from my Magento install.

In addition, can I also deleted the images from the directory "downloadable" as I've already deleted all the product entries for the sample data?

1 Answer 1

3

If you're sure they're not used then Yes. However if you're still an it nervous use this command

 mv media/magefan_blog/ /home/#user#/magefan_blog/

Obviously replace ##user## with your user or replace the directory sending the folder to with root if you're logged in as root. Then test your site and look for any issues after the images are no longer available.

If all looks good, then delete the folder out your home folder

6
  • 1
    TImothy, do you know how to search the DB for pages that link to these "unused" items, or links to the items in general? i was told that as long as there are no links in the DB, it is 100% safe to delete these items. But, if there are still links to the files in the DB, it will throw errors somewhere down the line.
    – Jason
    Commented Dec 6, 2016 at 9:02
  • 1
    @Jason good question, try running this command mysqldump --compact --skip-extended-insert -u root -proot mydb | grep "filename" obviously change the user if required. If you have a recent db backup lying about you can run it against that rather than having the mysqldump Commented Dec 6, 2016 at 23:21
  • Timothy, thanks. I'm not versed on sql, could you tell me what this query is going to do the database? Sorry for asking more.
    – Jason
    Commented Dec 7, 2016 at 8:34
  • Mysqldump -u root -p --compact --skip-extended-insert -proot dbname | grep "name of media file" Commented Dec 7, 2016 at 19:52
  • 1
    It copies the database to a file (exports) and searches the output for the file name Commented Dec 7, 2016 at 22:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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