Search code examples
laravelcachingbrowserhostingdevelopment-environment

Updating a hosted 5.3 laravel web site in BLUEHOST


I'am currently working on a hosted web site which was developed with Laravel 5.3 in Bluehost . So for futher developments I have folled below procedure.

  1. Compressed the folder and downloaded it in to local machine.
  2. Created a public folder and moved relevant folders into it.
  3. Via php artisan serve develpment started and everything went fine.

After the development only 4 files to be changed in the server. So I have opened the related files in server and updated the coding by just copy and paste.

When I refresh the web url after updating files I can see that php and html updated correctly but css and javascript was not updated. So I checked the files again but they are almost updated. But when I view the source I can see that both css and javascript files have not updated.

So I just created new files in the server with different names and linked them into the blade.php files and then css and javascript working fine .Also when I view the source they are also updated.

Can anyone say what is the reason for this?


Solution

  • This happens due to caching most of the time. If you are using Cloudflare as a service purge the cache and give it a try.

    Steps to purge your domain cache due to Cloudflare

    STEP 01

    Login to your Cloudflare account and select the domain you want to purge the cache.

    STEP 02

    Go to the caching tab.

    STEP 03

    In there, there are two options you can select. one is, you can purge the cache on selected file by simply given the URL of the file you want to purge the cache.

    the second one is you can purge all cache in Cloudflare server under your domain by clicking purge everything button.