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

eta-orionis's avatar

PHPStorm Pros: how do you get the IDE to work reliably at all?

I'm sorry if this may sound ranty - that is not my intention. I have spent the past 6 hours trying to get PHPStorm to do anything at all, but no success. (FWIW: I've been developing for 20+ years and used many IDEs, but PHPStorm is not one of them)

My question is: How do you get PHPStorm to work reliably at all? Any tips/help are appreciated.

Here is the unabridged description of my experience from installation until I gave up 6 hours later. (Fresh PHPStorm installation on a MacBook Pro with 36 Gb memory and latest OS, with no special settings or software installed.)

  1. I install PHPStorm and look forward to it. I open an existing DevContainers project created with Laravel Sail. (The project is just a bare Laravel installation, nothing special. It works flawlessly with VSCode). PhpStorm creates the container, downloads the remote IDE part inside the container, connects to it, and opens ... IntelliJ IDEA. Which is useless for PHP/Laravel.

  2. I create a new PHPStorm devcontainers project, but this time I let PHPStorm clone the repo fresh from the server. Container build fails because Sail's docker-compose uses an env variable that is not defined in the container environment of PHPStorm. I hardcode the variable, push the fix to the repo, quit and restart PHPStorm, retry creating the project. PHPStorm fails exactly the same as before, because it doesn't check out the latest version of my repo - it takes it from its internal cache, i.e. from the old, buggy checkout.

  3. I uninstall/reinstall PHPStorm and reset my whole docker installation, just to make sure everything is gone. PHPStorm finally clones and builds the container properly. But it doesn't respect the postCreateCommand from the devcontainer.json and it doesn't install my dotfiles as a result. I end up working on a bare shell.

  4. I close PHPStorm. It asks whether I want to keep containers running or stop them. I tell it to stop them. When I reopen the project a few minutes later, it fails, because the old containers have been left running and are blocking the mapped ports.

  5. I stop all running containers from the Docker UI. Restart PHPStorm, try to open the project again. It downloads again the whole IDE part inside the container. Then everything goes blank in PHPStorm and the project is nowhere to be seen, not even in the "Recent projects". This persists after restart; the project is de-facto lost.

  6. I clean up docker, restart everything, make a new project, and so on. PHPStorm hangs trying to connect to the newly-built container.

  7. I give up on devcontainers. I install Laravel IDEA, then create a new Laravel project. It opens. I choose "Run artisan command" from the menu and choose to run the "serve" command. PHPStorm opens a terminal pane in which it runs "php artisan serve additional arguments". I.e. it has added the string "additional arguments", which "serve" does not expect, so it fails. I check the settings; there is a checkbox to "add additional arguments", but a) it is unchecked, b) it does nothing anyway. No matter what I do, all artisan commands get the "additional arguments" string added to them. Google gives no hits and no clues, whereas ChatGPT hallucinates a "solution".

  8. I repeat all of the above steps, but delete the PHPStorm installation and the files in "Library/Application Support" and "Library/Cache" before each step (as per JetBrains' instructions on how to uninstall). All problems can be reproduced, except for #1 and #6.

During this time, whenever I switch to Chrome to google for solutions, I notice that Chrome has a two-second typing lag - but only when PHPStorm is open.

So, to repeat again the question: How do you get PHPStorm in general (and its remote development in particular) to work in a halfway-stable manner?

Thank you!

0 likes
3 replies
LaryAI's avatar
Level 58

Certainly! PHPStorm can be a fantastic IDE for PHP/Laravel development, but its remote development and DevContainers support can be tricky, especially compared to VSCode. Here are some practical steps and tips to get PHPStorm working reliably, particularly with Laravel Sail and DevContainers:


1. Use PHPStorm’s Official Docker & Remote Development Docs

Start by reviewing JetBrains’ official documentation for Remote Development and DevContainers. PHPStorm’s implementation is different from VSCode’s, and some features (like postCreateCommand and dotfiles) may not be fully supported yet.


2. Recommended Approach: Use Docker Compose Instead of DevContainers

Laravel Sail is built on Docker Compose. Instead of using DevContainers, configure PHPStorm to use Docker Compose for your interpreter and services:

  • Open your project locally (not as a DevContainer).
  • Go to Preferences > PHP > CLI Interpreter.
  • Click the + button, select "From Docker, Vagrant, VM, WSL", then choose "Docker Compose".
  • Point it to your docker-compose.yml file (used by Sail).
  • Select the laravel.test service as your interpreter.

This approach avoids many DevContainer-specific issues and gives you full access to all PHPStorm features.


3. Troubleshooting DevContainer Issues

If you must use DevContainers, here are some solutions to your specific problems:

  • IntelliJ IDEA opens instead of PHPStorm:
    Make sure you’re opening the project with PHPStorm, not IntelliJ. If you see IDEA, it may be due to file associations or JetBrains Toolbox settings. Uninstall IDEA if you don’t need it.

  • Container build fails due to missing env vars:
    Add required environment variables to your .env file or pass them explicitly in your devcontainer.json under runArgs or build.args.

  • PHPStorm uses cached repo:
    Delete the project from PHPStorm’s recent projects and remove the .idea folder and any cached directories in ~/Library/Caches/JetBrains/PhpStorm*. Then re-clone the repo.

  • postCreateCommand and dotfiles not respected:
    PHPStorm’s DevContainer support may not fully implement these features. As a workaround, manually run your setup commands in the container terminal after it starts.

  • Containers not stopping properly:
    Always check Docker Desktop or run docker ps to see running containers. Manually stop them if PHPStorm fails to do so.

  • Project disappears from Recent Projects:
    This can happen if the .idea folder is corrupted. Delete it and re-import the project.

  • Artisan commands get "additional arguments":
    This is a known bug in some versions of the Laravel IDEA plugin. Try updating the plugin, or run artisan commands directly in the terminal as a workaround.


4. Performance Issues

  • High resource usage:
    PHPStorm is resource-intensive, especially with remote development. Try increasing the IDE’s memory allocation:

    Help > Change Memory Settings
    

    Or edit phpstorm.vmoptions to increase -Xmx (e.g., -Xmx4096m).

  • Disable unnecessary plugins:
    Go to Preferences > Plugins and disable anything you don’t need.


5. General Tips

  • Always use the latest PHPStorm version and plugins.
  • If DevContainers are unstable, use Docker Compose integration instead.
  • For Laravel, the Laravel Idea plugin is helpful but not required.
  • If you encounter persistent bugs, report them to JetBrains via Help > Submit a Bug Report.

Summary Workflow Example (Docker Compose):

  1. Clone your Laravel project locally.
  2. Start Sail:
    ./vendor/bin/sail up -d
    
  3. In PHPStorm, set up Docker Compose as the PHP interpreter.
  4. Use the built-in terminal for artisan commands.
  5. Use PHPStorm’s debugging, code navigation, and other features as normal.

If you want to stick with DevContainers and need full feature parity with VSCode, you may have a smoother experience with VSCode for now, as JetBrains’ DevContainer support is still maturing.


References:

If you need step-by-step screenshots or further help, let me know!

jlrdw's avatar

There is a whole video series on phpstorm here. It might help.

orphanedrecord's avatar

Sounds frustrating … sorry to hear the IDE is fighting :(

It took me quite awhile to get through the learning curve with PhpStorm … but, I'm glad I did! It really is an awesome tool once you get everything setup.

Like @jlrdw mentioned, Jeffrey did a course a couple years ago called PhpStorm for Laravel Developers which is probably still worth watching despite how fast things have changed.

And Christoph Rumpel also put together a video to Make PhpStorm Look Beautiful & Clean in 10 Minutes. I know you're just trying to get everything working vs. looking nice, but the flexibility of the aesthetics, first part support, continual releases (product improvements) and ability to customize almost everything really set the JetBrains products apart from the competition in my opinion.

I'd also try enabling the JetBrains' Junie (AI tool), which can look through your codebase and perhaps help with your specific configuration?

Also, there is a different between the IntelliJ IDEA Ultimate and Community Edition. The former (Ultimate) is kinda like the grandaddy of all IntelliJ IDEs rolled into one where you can enable different languages as installed plugins. I used to use IntelliJ IDEA Ultimate for PHP and Laravel development all the time and it worked great … PhpStorm is just more focused.

Anyway, I hope you stick with it and fight through the learning curve … I think you'll be rewarded.

1 like

Please or to participate in this conversation.