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

step1step2's avatar

Could not open input file: artisan

Could not open input file: artisan
Script php artisan clear-compiled handling the post-update-cmd event returned with an error



  [RuntimeException]
  Error Output:



update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [packages1] ... [packagesN]

I just unchecked Forge option that installs a migration because it caused some problems. How does php artisan migrate work on Forge? Just tried php artisan migrate --force because it gets used with the default deployment script.

php artisan returns in Could not open input file: artisan running it in the project root.

0 likes
3 replies
step1step2's avatar

Is this problem retailed to Laravel itself? I get the same error with a clean 4.2 installation.

step1step2's avatar
step1step2
OP
Best Answer
Level 2

Wow after 4 hours I figured it out and changed the forge deploy script to:

cd /home/forge/sitename
git pull origin master
composer update --no-scripts
php artisan migrate --force
sgelbart's avatar

for me it was

cd /home/forge/default

(probably because we used server name as site name?)

Please or to participate in this conversation.