Search code examples
laravelstorage

how to unlink storage of laravel in window?


I'm moving my project from one system to another in which storage is not working properly. i need to refresh the link of storage but when itry php artisan storage:link it says already linked. But i need to refresh it what is should do ?


Solution

  • php artisan storage:link
    

    The above command will create symbolic link in public/storage from storage/app/public

    so when you move laravel project to new server then remove generated symbolic link folder from public/storage

    enter image description here

    Also, make sure to delete only the symbolic link folder not the original content also . Sometimes in Filezilla, it asks to choose the option to delete the original file also.

    enter image description here

    Another better option is not to move the symbolic link folder to a new server so you can create new symbolic link to storage folder