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

fsdolphin's avatar

How to Reset Laravel Projects to Start With a Fresh Install

Hi,

I'm constantly using one project for testing and most of the time I like to start with a fresh install. The way I have been doing it is by deleting the project and re-creating it but I was wondering if there is a simpler way to reset an existing project with a composer command. The reason I try to reuse an existing project name is so I don't have to map new ones in the homestead.yaml file and the hosts file.

Is there a way to reset an existing Laravel project?

What is currently your workflow when creating testing projects, do you reuse existing projects or you keep adding new ones?

Thanks a lot

0 likes
6 replies
cristian9509's avatar
Level 4

Don't think with composer you can! I think you need to use GIT. Just reset it to the initial node.

1 like
cristian9509's avatar

you can also do branches from the initial node and therefore you could keep lots of projects even if they are for testing. you never know when u need to revisit.

1 like
fsdolphin's avatar

Wow, that's a cool idea, I never though bout that. Thanks a lot.

tisuchi's avatar

@fsdolphin

It might be too late to response. However, I believe you can go with Via Laravel Installer process that can help you to make fresh installation each time.

laravel new blog this command create a new fresh laravel blog for you. Its much faster than downloading via composer each time.

https://laravel.com/docs/5.2

2 likes
fsdolphin's avatar

@tisuchi It is what I use now, + php artisan serve.

laravel new blog + php artisan serve = Awesome

laravel new blog + Valet = Super Awesome

2 likes

Please or to participate in this conversation.