0

I have a Laravel project and I have uploaded it in the public_html folder in the hosting. Then I added the server in the PhpStorm project and it is working fine and no need to upload all files again and again, I can only upload changed files automatically. I was able to access the Laravel website as abc.com/public.

Then I searched to skip the public from the url. I followed the process and place all my Laravel files in the root path, before the public_html then I only placed the public folder of Laravel to the public_html. Now I want to know how I can manage this project in PhpStorm remotely? I mean changes should upload automatically.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Asif Mushtaq
  • 3,658
  • 4
  • 44
  • 80

1 Answers1

0

As Derek suggested you should use version control Github or Bitbucket.

Or you can create sym link to avoid multiple occurrences of your code and remove public from URL

Your previous directory structure: - /root - public_html - laravel_project

What you can do is:

  • /root
    • laravel_project
    • public_html
      • sym_link -> /root/laravel_project/public

Use these commands

cd public_html

ln -s /root/laravel_project/Public sym_link

In this way there will only be one code base and do changes in that with your IDE

Anuj Goyal
  • 29
  • 1
  • 6
  • Github is for saving, or version control. How it can be work with live project as on hosting? – Asif Mushtaq Nov 11 '18 at 09:19
  • Github is for version control. You can create a repository over github and push all your code to the respository and clone for first time (or pull after that) on server. You can understand from this link : https://guides.github.com/activities/hello-world/ – Anuj Goyal Nov 11 '18 at 10:33
  • Do you really understand what I'm asking? I have deployed my laravel project on hosting There I want to change. – Asif Mushtaq Nov 11 '18 at 11:00
  • If you don't want to use version control, then In Phpstorm you can add remote server with root path also access our files with that. – Anuj Goyal Nov 11 '18 at 11:16
  • But files are divided on two places, read my question please. – Asif Mushtaq Nov 11 '18 at 11:22
  • To manage that, you can create symlink, In this way only one file need to be changed and automatically it wil reflect in both places. Please refer to this link on how to create symlink: https://stackoverflow.com/questions/1951742/how-to-symlink-a-file-in-linux – Anuj Goyal Nov 11 '18 at 13:31