Search by tag: ftp

1 article

How to create symbolic links via FTP

Spoiler: you cannot!

In order to use Laravel File Storage utility, I had to create a symlink in the public folder pointing to a subfolder located in the... storage folder. That is nice and easy when you can ssh to your production server. However, it is a whole other story if you only have FTP access!

So the solution was to let PHP do the work for me, by using the handy symlink function:

if (!file_exists('./storage')) {
    symlink("../storage/app/public", "./storage");
}

Create symbolic links on server without SSH available?