This guide will walk you through the process of installing Symfony, a popular PHP framework, on your local machine. Make sure you have PHP and Composer installed before you begin.
System Requirements
- PHP 7.1.3 or higher
- Composer 1.10.0 or higher
Installation Steps
Install Composer: If you haven't already installed Composer, you can do so by downloading it from Composer's website.
Create a New Project: Open your terminal and navigate to the directory where you want to create your new Symfony project. Then, run the following command:
composer create-project symfony/skeleton my_project
Replace
my_project
with your desired project name.Navigate to Your Project: Change directory to your new project:
cd my_project
Install Dependencies: Run the following command to install all the required dependencies:
composer install
Run the App: To start the development server, run the following command:
php bin/console server:run
You can now access your application by navigating to
http://localhost:8000
in your web browser.
Next Steps
After installing Symfony, you might want to explore some of the following resources:
Conclusion
Congratulations! You have successfully installed Symfony on your local machine. Now you can start building your next PHP application with this powerful framework.