Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ajithlal's avatar

public_path() issue after moving site live

I've hosted my website on shared hosting. Moved all folders and files inside the public folder to public_html path rest of the files outside the public_html folder. I'm having trouble with file upload.

first I'm moving my uploaded file to uploads folder under public folder and then I compress the size of the image and move to the desired destination. When tried to access the uploads folder using public_path() function it returns the path outside the public_html folder. How to fix this?.

0 likes
1 reply

Please or to participate in this conversation.