Laravel 12 Rollback a Specific Migration

In this article titled “Laravel 12: How to Rollback a Specific Migration”, I’ll guide you through the process of rolling back a particular migration in a Laravel 12 application — explained step by step with a practical example. The method shown here is also compatible with earlier Laravel versions including Laravel 7, 8, 9, 10, and 11.

In this guide, you'll discover how to:

  • Rollback a specific migration file

  • Re-run a selected migration after rollback

  • Rollback a specific migration and run database seeding

Rollback a Specific Migration

Rather than executing a full migrate:rollback—which reverts the entire last batch of migrations (potentially affecting multiple files)—Laravel provides a way to rollback just one specific migration by using the --path option.

php artisan migrate:rollback-- path=database/migrations/2025_07_14_134057_create_tests_table.php

🔔 Important: Ensure there is no space between --path= and the migration file path. Adding a space will result in a command error.

Read More : read full blog

0
Subscribe to my newsletter

Read articles from itstuffsolutiotions directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

itstuffsolutiotions
itstuffsolutiotions

Experienced Web Developer | Laravel | PHP | jQuery | HTML | CSS I’m a skilled web developer with extensive experience building dynamic and responsive web applications using Laravel, PHP, jQuery, HTML, and CSS. I specialize in creating clean, scalable, and maintainable code, with a focus on performance and user experience. Whether it's developing RESTful APIs, building custom CMS features, or crafting responsive front-ends, I bring a problem-solving mindset and a passion for quality to every project.