How I Can I Upload My Yii2 Project On Web Server

Hi I am trying to upload the Yii2 advanced template application on the web server. The cpanel is not the just like normal server, there is not any method of error tracing.

but my I am getting blank on browser when I access the application. I had double checked the database connection.

I also want to track the error and log in files.

I don’t how to fix this issue. Is there any specific way to install yii2 on webserver

Do you have a shell (SSH) access to your web server? Installing process will be almost the same as you followed on your local environment.

Can’t I upload it like normal upload, do i need to install with composer like.

What are the things i need to do install on web server.

Thank you waiting for your response.

You can upload from local as well. Just ensure, you have a production configuration exactly similarly done (e.g. db config, path aliases etc.) on the local before uploading - so you do not need to change the config files.

You just need to then drop in your entire app folder on the server. The only thing is you will need to do all future updates to packages via composer on your local and the push/sync time to time.

Alternatively, you can do a fresh app install via composer on your server, and then copy your app specific folders (e.g. frontend/backend/common). In future then, you could directly use composer to update your packages from server.

any idea how do i install from composer to my server. I have cpanel details.

I am new to composer technology

You need to have shell (SSH) access enabled to access your host. Check if your hosting provider has given this access. Generally many good shared hosts do provide this but it needs to be enabled through some config in your CPanel. Once you have SSH access, you can connect with some ssh telnet client like PUTTY (from windows) to your server console and then you may need to install composer and run install commands.

If you don’t have ssh access, you’ll need to zip and upload the vendor dir manually.

Hi had download the zip file from the and uploaded to my web server, but it does not work. How to initialize it in my server so that I can run just like access in my local server.

I am sorry but I am stuck with some nonsense issue.

I could appreciate any from other developer who had successfully install yii2 on webserver.

The best way is what Kartik told you before. If you are “Production Ready” just zip all your project and upload it to you web server. That way you don’t need to install composer on it and all the dependencies will be ready.