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

anmol's avatar
Level 2

uploading the website on shared hosting.

i have been trying to upload the website on a shared hosting .in the cpanel,file manager root directory i made a folder called laravel and kept all the files except public files which i have kept in the public_html.... .i changed my index.php to ../laravel/bootstrap now as far as i know it should be showing a sql error but it not.it is showing me a blank white page.when i click on the source code there is no source code.it is totally empty like it is not able to acess the views of my laravel folder and in error logs the error is '/ [Tue Mar 21 15:56:28.259166 2017] [core:crit] [pid 19184] (13)Permission denied: [client 182.64.66.54:54866] AH00529: /home/tncpscouriers/public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/tncpscouriers/public_html/' is executable, referer: http://tncpscouriers.com" ' i have been stuggling to do this since tomorrow and i have a deadline if anyone can help me plz give your solutions.i have made sure about the php version.which is 5.6 and i have double checked the permissions.i have no idea about what the content of .htaccessfile should be but this is my .htaccess file

    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>```



0 likes
56 replies
bashy's avatar

Ask your host to make these changes;

  1. Move the website files up to the level with public_html
  2. Create a symlink from public_html -> new_folder/public

You can then use it as normal.

1 like
anmol's avatar
Level 2

@bashy how doi tell my host???i mean do i need to contact the tech support???and do you mean i don't have to create a new folder named laravel in the root directory rather upload all the website files in the root directory so that can be at level with public_html??

bashy's avatar

Yeah ask them via whatever contact you have available.

You can move the folder you have inside public_html (but ask them first if they can do the other change).

1 like
anmol's avatar
Level 2

@bashy the structure i have right now is inside the file manager i have root directory called home/'domainname' inside it lies .cpanel ,.cphorde,.public_html,public_ftp,logs,etc,mail,ssl ,.trash,tmp and so on.

anmol's avatar
Level 2

problem i have is i am working for someone and i don't have a direct contact with the host providers i don't have registered email and they won't make any change until i generate a token from the registered email.which will take a while and i will have to ask the guy i am working for.

anmol's avatar
Level 2

@bashy i brought the laravel folder inside public_html and kept all my files in it except public files and gave .htaccess to the laravel folder

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*)$ laravel/public $1 [L]
</IfModule>
now it is showing a internal 500 error
anmol's avatar
Level 2

@Snapey bro if you could look into this.because even when i deleted the entire project and tried uploading a basic laravel website ,following a youtube video it still does not shows up.shows a blank white page does that mean the problem is with hosting website??

jlrdw's avatar

@anmol have you tried uploading a fresh new install blank project with nothing in it to the host web root just to make sure you get the initial laravel welcome screen, that will tell you if it works, it sounds like something is not correct with this hosting provider. Are you sure this host meets laravels minimum system requirements, including the required extensions.

What is that host?

If you developed anything in Windows, Linux is case sensitive.

anmol's avatar
Level 2

yes,thats exactly what i did @jlrdw made new project with command laravel new test than made a zip file of this proect and uploaded it to the public_html.now all my files including public files and rest of files and folders are at same level and it still does not work.i followed it step by ste from youtube video.i am using ewebguru hosting services.i ahve developed my entire application in ubuntu linux.

anmol's avatar
Level 2

i did not upload the files in the root folder but in the public_html folder rather.in my root folder there are files like .trash,.cpanel,.cphorde,trash,public_ftp,public_html and so on so i don't think i will be allowed to upload my files over here.

jlrdw's avatar

public_html is webroot, webroot means normally where the host tells you to put the files., what host is it?

anmol's avatar
Level 2

it is a shared server.linux based ,named ewebguru.

anmol's avatar
Level 2

the guy who gave me the work already had uploaded basic index.html page in public_html with html and css and it was working fine.but mine does not work which have backend stuff and his code embedded in it..

jlrdw's avatar

Again what version of laravel are you using?

jlrdw's avatar

What is the folder that public_html is under?

Like

foldername/public_html

what is foldername

anmol's avatar
Level 2

inside file manager /home/tncpscouriers.com

jlrdw's avatar

Do they have at least PHP 5.6.4

anmol's avatar
Level 2

when i go to php version and i click on the domain name to change the version ther is written (inheritance)i don't really if it actuall y changes the php version though i make the changes plud do we need to go to .env file and change the app_url to the domain name.which i have tried tho.i have tried almost everything.lolall the permutation and combinations that were possible.

anmol's avatar
Level 2

no they just have 5.5 5.6 7.0.thats all

jlrdw's avatar

When you developed this app, explain your development machine, windows, linux, xamp, what, and did you develop all in webroot, (htdocs)

anmol's avatar
Level 2

ok so i developed this app in linux,ubuntu.use xampp for mysql yes i did develop this htdocs tho.but how does that matter???because later i made changes in the fronend code of my project which was most done not in the root directory tho.but obviously i started it in the htdocs.

jlrdw's avatar

@anmol backup your entire development. and do this

  • upload entire project to that public_html folder
  • see if it works
  • DO NOT LEAVE IT THAT WAY
  • THERE ARE SECURITY PROBLEMS IF LEFT LIKE THAT

Now if it works under public_html do this

  • Any configs in the env file hard code in laravel
  • That way you don't expose the env file to everybody
  • Delete the env file

This is not the best / right way to install, but it may be your only option.

And to hardcode every config, it's like

config(['app.timezone' => 'America/Chicago']);

With env deleted, it will get second parameter. every config needs hard coding, database and everything, but see if it works first.

I don't know how else to explain this stuff.

Call that host and see what ver they use, buy one month yourself to get the tech support, and test install.

anmol's avatar
Level 2

ok.i will try it once again.

anmol's avatar
Level 2

they have 5.5 5.6 7.0.default is 5.5 which i have changed to 5.6

jlrdw's avatar

Must be at least 5.6.4 or greater. Or try 7.

anmol's avatar
Level 2

so what i did was.rather than using my project i made another new project in htdocs .made a zip file of entire folder and uploaded it.then i moved the files to public_html/ .but public files were inside public folder along with all other files.and then when entered url of the website in my browser i got a listing of entire file structure .fine then i moved the public files to public_html and then when i entered the url again .now it started showing a blank white page with no source code nothing.it like it is not getting the right path maybe.or something is wrong.

Next

Please or to participate in this conversation.