Installing Nette

Do you want to harness the benefits of Nette in your existing project, or are you planning to create a new project based on Nette? This guide will walk you through the installation step by step.

How to Add Nette to Your Project

Nette offers a collection of useful and sophisticated packages (libraries) for PHP. To incorporate them into your project, follow these steps:

  1. Set up Composer: This tool is essential for the easy installation, update, and management of libraries required for your project.
  2. Choose a package: Let's say you need to navigate the file system, which Finder from the nette/utils package does excellently. You can find the package name in the right column of its documentation.
  3. Install the package: Run this command in the root directory of your project:
composer require nette/utils

Do you prefer a graphical interface? Check out the guide on installing packages in the PhpStrom environment.

How to Start a New Project with Nette

If you want to create an entirely new project on the Nette platform, we recommend using the pre-set skeleton Web Project:

  1. Set up Composer.
  2. Open the command line and navigate to the root directory of your web server, e.g., /etc/var/www, C:/xampp/htdocs, /Library/WebServer/Documents.
  3. Create the project using this command:
composer create-project nette/web-project PROJECT_NAME
  1. Not using Composer? Just download the Web Project in ZIP format and extract it. But trust us, Composer is worth it!
  2. Setting permissions: On macOS or Linux systems, set write permissions for directories.
  3. Open the project in a browser: Enter the URL http://localhost/PROJECT_NAME/www/. You'll see the landing page of the skeleton:

Congratulations! Your website is now ready for development. Feel free to remove the welcome template and start building your application.

One of the advantages of Nette is that the project works immediately without the need for configuration. However, if you encounter any issues, consider looking at common problem solutions.

If you're starting with Nette, we recommend continuing with the Create Your First Application tutorial.

Tools and Recommendations

For efficient work with Nette, we recommend the following tools:

version: 4.0