Search code examples
phpstormcpanel

PhpStorm deployment successful but does not update remote file


I am using a shared hosting platform to host my website and I am using PhpStorm as my IDE.

I have configured PhpStorm for deployment which connects successfully to the server.

When I deploy my file to the server the file transfer terminal shows successful... but if I check the file on the server it is not updated.

enter image description here


Solution

  • The deployment seems to work fine: if it says uploaded then it did.

    You can use "Compare with Deployed..." on such a file (or "Synchronize with Deployed..." on a folder) to see if it will show any differences: if it shows the difference then we have an issue; otherwise it's a misconfiguration somewhere.

    https://www.jetbrains.com/help/phpstorm/comparing-deployed-files-and-folders-with-their-local-versions.html#compare-local


    I have seen quite a few PhpStorm tickets/forum treads with similar descriptions... and extremely likely this will be user mistake/misconfiguration.

    1. Please double check the file paths (path mappings). You may be uploading to the wrong folder.

      Looking at your paths (from your screenshot):

      • source: C:\xampp\htdocs\agents\application\controllers\Payments.php
      • target: /public_html/application/controllers/Payments.php

      The agents must be the project/website name here and you upload from /agents/application to /public_html/application.

      It's possible (for such controller files at very least) that /public_html is not needed here and you may want to upload it into the /application folder instead.

    2. Make sure that you are using the correct Deployment entry (in case you have more than one). You may simply be uploading to another/wrong server.