How to start local server with symfony 5 or downgrade version to 4.4?

How to start local server with symfony 5 or downgrade version to 4.4?

  1. Blog
  2. 15 November 2026
  3. 3 min read

Stefan Bogdanescu

Founder & Senior Architect

How to start local server with Symfony 5 or downgrade version to 4.4?

You are encountering a specific breaking change between Symfony 4 and Symfony 5 regarding the development server utility. In your Symfony 4.4 environment, running php bin/console server:run works as expected. However, upon upgrading to Symfony 5, that same command yields the error "Command 'server:run' is not defined."

This happens because the underlying package responsible for starting the local development server was deprecated and subsequently removed from the core framework between these major versions. Specifically, the symfony-server-bundle was dropped. Consequently, the console:server:run command no longer exists in the standard Symfony 5 installation. When you run the command now, the console suggests running console:dump instead, which is a different utility used for dumping configuration or logs, not for serving your application via HTTP.

Starting the Local Server in Symfony 5

To start a local development server with Symfony 5, you need to use the built-in PHP built-in web server functionality directly, bypassing the old bundle entirely. The modern approach is to run the server:start command, which leverages the Symfony Runtime or the standard PHP CLI capabilities depending on your specific setup and configuration files.

If you simply want to start a basic development server without complex routing or SSL handling immediately, execute the following command in your project root:

php bin/console server:start 0.0.0.0:8000 --no-autoreload

However, note that Symfony 5 often relies on symfony/runtime to bootstrap the application properly. If you are using a fresh install, the standard way to serve the project is often just running:

php -S localhost:8000 -t public

This command starts the built-in PHP server directly pointing to your public directory. This method works regardless of the Symfony framework version installed, provided you have a valid composer.json and autoloading configured correctly for that version.

If you require the full stack features (like reloading on file changes or specific routing), ensure you are using the symfony/runtime compatible commands provided by your installation. The exact command might vary slightly depending on whether you have installed additional bundles that re-introduce server management, but the core expectation is that server:run is gone forever in the base framework.

Downgrading to Symfony 4.4

If your workflow is strictly dependent on the server:run command and you cannot adapt to the new php -S or server:start methods, downgrading to Symfony 4.4 remains a viable option. This involves modifying your dependency versions to match the last release of the 4.x line.

You must update your composer.json file to reflect the version constraints for Symfony components and the framework itself. For example:

{
    "require": {
        "symfony/framework-bundle": "^4.4",
        "symfony/http-kernel": "^4.4",
        // ... other dependencies locked to 4.4 ranges
    }
}

After updating the file, run composer update. Be aware that downgrading introduces significant trade-offs. You lose access to all features introduced in Symfony 5, such as improved PHP support for newer versions (though 4.4 has specific PHP version requirements), new form components, and updated security practices. Additionally, any custom code relying on deprecated APIs removed in 5.0 might break if you haven't addressed them yet, but conversely, code written specifically for 4.4 syntax will work perfectly fine again.

Ensure your composer.lock file is regenerated to reflect these changes. Once the dependencies are updated and locked, running php bin/console server:run should return to its previous behavior without errors. This approach guarantees compatibility with existing scripts that expect the legacy command structure.

Choosing Your Path

The decision between adapting to Symfony 5 or downgrading depends on your project's long-term goals. If you are starting a new API test project, sticking with Symfony 5 is generally recommended for security and performance, provided you adopt the correct server-starting commands. Downgrading should only be considered if the specific server:run command is a hard requirement for your local workflow and cannot be replaced by the modern alternatives.

Our network