{"id":15587,"date":"2019-02-21T12:24:25","date_gmt":"2019-02-21T12:24:25","guid":{"rendered":"https:\/\/www.hostinger.com\/tutorials\/?p=15587"},"modified":"2026-01-13T12:10:11","modified_gmt":"2026-01-13T12:10:11","slug":"how-to-install-laravel-on-ubuntu","status":"publish","type":"post","link":"\/tutorials\/how-to-install-laravel-on-ubuntu","title":{"rendered":"How to install Laravel on Ubuntu with Apache"},"content":{"rendered":"<p>There are many powerful PHP frameworks, but some of them have limitations when it comes to reading the application&rsquo;s source code. This can be a problem if you want to document application code.<\/p><p>Fortunately, Laravel, when combined with Apache, provides an excellent solution. This PHP framework efficiently organizes and compresses the source code. In this tutorial, we&rsquo;ll guide you through the full installation of Laravel with Apache on Ubuntu.<\/p><p><strong>A brief overview of installing Laravel on Ubuntu with Apache:<\/strong><\/p><figure tabindex=\"0\" class=\"wp-block-table\"><table><tbody><tr><td>Required Knowledge<\/td><td>Basic Ubuntu server management, PHP, Apache<\/td><\/tr><tr><td>Privileges Required<\/td><td>Root or sudo user privileges<\/td><\/tr><tr><td>Difficulty<\/td><td>Intermediate<\/td><\/tr><tr><td>Main Goal<\/td><td>Installing Laravel, configuring PHP and Apache<\/td><\/tr><tr><td>OS Compatibility<\/td><td>Ubuntu 22.04 or later<\/td><\/tr><\/tbody><\/table><\/figure><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/Linux-Commands-Cheat-Sheet.pdf\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" width=\"2048\" height=\"566\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet.png\/public\" alt=\"\" class=\"wp-image-69262\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet.png\/w=2048,fit=scale-down 2048w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 2048px) 100vw, 2048px\" \/><\/a><\/figure><\/div><p>\n\n\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-what-is-laravel\">What is Laravel<\/h2><p>Laravel is unsurprisingly one of the most <a href=\"\/tutorials\/best-php-framework\">popular PHP frameworks<\/a>. It has many unique features that make it one of the best-rated options for web developers.<\/p><p>It also has great documentation and loves well-done source code, which translates into very expressive code syntax. Fast, efficient and user-friendly &ndash; Laravel. Here&rsquo;s how you can install Laravel <a href=\"\/tutorials\/what-is-ubuntu\">Ubuntu<\/a>.<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-install-laravel-on-ubuntu\">How to install Laravel on Ubuntu<\/h2><p>Before we start, you&rsquo;ll need to SSH into your virtual private server. Here&rsquo;s a <a href=\"\/tutorials\/how-to-use-putty-ssh\">helpful tutorial<\/a> to help you along.<\/p><p>Following the steps below will walk you through the easiest way to install Laravel on Ubuntu:<\/p><h3 class=\"wp-block-heading\" id=\"h-1-install-apache-web-server\">1. Install Apache web server<\/h3><p>For Laravel to work, you&rsquo;ll need Apache. It is one of the most popular HTTP server tools, so it&rsquo;s likely that your VPS has it installed. Luckily, you can check easily! Once you connect to your server using <strong>SSH<\/strong>, verify that an Apache system service exists. To do so, we have to run this command.<\/p><pre class=\"wp-block-preformatted\">sudo systemctl status apache2<\/pre><p>As you can see, on our VPS there is no Apache service, so we have to install it. To do this, execute the following command.<\/p><pre class=\"wp-block-preformatted\">sudo apt install apache2<\/pre><p>Ubuntu by default, starts the Apache service and makes it boot during system loading.<\/p><p>Now, if you&rsquo;re using a firewall, it is necessary to establish a rule in the <a href=\"\/tutorials\/how-to-configure-firewall-on-ubuntu-using-ufw\/\">Ubuntu firewall<\/a> so that Apache can run smoothly. If you have no firewall installed, feel free to skip this step.<\/p><pre class=\"wp-block-preformatted\">sudo ufw allow &ldquo;Apache Full&rdquo;<\/pre><p>After that, we can check the Apache service status again.<\/p><pre class=\"wp-block-preformatted\">sudo systemctl status apache2<\/pre><div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1365\" height=\"339\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/ubuntu-apache-status.png\/public\" alt=\"Apache server status command output on Ubuntu\" class=\"wp-image-15595\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/ubuntu-apache-status.png\/w=1365,fit=scale-down 1365w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/ubuntu-apache-status.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/ubuntu-apache-status.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/ubuntu-apache-status.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/ubuntu-apache-status.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/ubuntu-apache-status.png\/w=990,fit=scale-down 990w\" sizes=\"(max-width: 1365px) 100vw, 1365px\" \/><\/figure><\/div><p>Finally, open a web browser and go to the IP address of your server or its domain name.<\/p><p>If you see this screen, that means Apache is up and running.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1366\" height=\"666\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/apache-browser-screen.png\/public\" alt=\"Apache default screen on a browser\" class=\"wp-image-15596\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/apache-browser-screen.png\/w=1366,fit=scale-down 1366w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/apache-browser-screen.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/apache-browser-screen.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/apache-browser-screen.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/apache-browser-screen.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/apache-browser-screen.png\/w=990,fit=scale-down 990w\" sizes=\"(max-width: 1366px) 100vw, 1366px\" \/><\/figure><\/div><h3 class=\"wp-block-heading\" id=\"h-2-install-php\">2. Install PHP<\/h3><p>The next step is to <a href=\"\/tutorials\/how-to-install-install-php-ubuntu\">install PHP<\/a>. Fortunately, PHP 8 comes by default in Ubuntu&rsquo;s official repositories, which makes the installation very easy. You will need to install the language itself and some extra module. To do this, execute the following command:<\/p><pre class=\"wp-block-preformatted\">sudo apt install php libapache2-mod-php php-mbstring php-xmlrpc php-soap php-gd php-xml php-cli php-zip php-bcmath php-tokenizer php-json php-pear<\/pre><p>If the following command produced an output saying some packages were not found, simply update your Ubuntu by running the following command, and rerun the previous one:<\/p><pre class=\"wp-block-preformatted\">sudo apt-get update<\/pre><p>Now, we can test if PHP is working correctly. To do this, we need to create a file in Apache&rsquo;s root directory. Let&rsquo;s call it test.php. Run the following command:<\/p><pre class=\"wp-block-preformatted\">sudo nano \/var\/www\/html\/test.php<\/pre><p>And add the call to the phpinfo function.<\/p><pre class=\"wp-block-preformatted\">&lt;?php\nphpinfo();\n?&gt;<\/pre><p>We have to save it and close it. To save, hit <strong>CTRL+O<\/strong>, and to exit, hit <strong>CTRL+X<\/strong> Then, open the web browser and go to <strong>http:\/\/Your-serverIP\/test.php<\/strong>.<\/p><p>If you see this screen, you can be sure that PHP is working as it should.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1366\" height=\"666\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/php-info-screen.png\/public\" alt=\"PHP info screen on a browser\" class=\"wp-image-15598\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/php-info-screen.png\/w=1366,fit=scale-down 1366w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/php-info-screen.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/php-info-screen.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/php-info-screen.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/php-info-screen.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/php-info-screen.png\/w=990,fit=scale-down 990w\" sizes=\"(max-width: 1366px) 100vw, 1366px\" \/><\/figure><\/div><h3 class=\"wp-block-heading\" id=\"h-3-download-and-install-a-database-manager\">3. Download and install a database manager<\/h3><p>If we are going to develop using Laravel in Ubuntu 22.04, it is necessary to install a database manager. Laravel supports PostgreSQL, MySQL, MariaDB, SQLite, and SQL servers. We can install and configure the one we want. For this tutorial, we will install MariaDB.<\/p><pre class=\"wp-block-preformatted\">sudo apt install mariadb-server<\/pre><p>After that, you can set a password for the root. To do this, you need to use the mysql_secure_installation script. Keep in mind that this step is optional but recommended for security reasons.<\/p><pre class=\"wp-block-preformatted\">sudo mysql_secure_installation<\/pre><p>After we define the root password, we will be asked several MariaDB configuration questions. The answers you should input are next to the lines of code:<\/p><pre class=\"wp-block-preformatted\">Remove anonymous users? [Y\/n] y\nDisallow root login remotely? [Y\/n] n\nRemove test database and access to it? [Y\/n] y\nReload privilege tables now? [Y\/n] y<\/pre><div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1366\" height=\"768\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/mariadb-configuration-ubuntu.png\/public\" alt=\"Maria DB configuration on ubuntu\" class=\"wp-image-15599\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/mariadb-configuration-ubuntu.png\/w=1366,fit=scale-down 1366w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/mariadb-configuration-ubuntu.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/mariadb-configuration-ubuntu.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/mariadb-configuration-ubuntu.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/mariadb-configuration-ubuntu.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/mariadb-configuration-ubuntu.png\/w=990,fit=scale-down 990w\" sizes=\"(max-width: 1366px) 100vw, 1366px\" \/><\/figure><\/div><p>Congratulations, MariaDB was installed successfully. <\/p><p>If you prefer a NoSQL database management system, read our tutorial to learn about <a href=\"\/tutorials\/how-to-install-mongodb-on-ubuntu\/\">how to install MongoDB on Ubuntu<\/a>.<\/p><h3 class=\"wp-block-heading\" id=\"h-4-install-composer\">4. Install Composer<\/h3><p><a href=\"\/tutorials\/how-to-install-composer\">Composer<\/a> is a PHP dependency manager that facilitates the download of PHP libraries in our projects. Composer works great and makes it much easier to install Laravel.<\/p><p>First, we need to download Composer.<\/p><pre class=\"wp-block-preformatted\">curl -sS https:\/\/getcomposer.org\/installer | php<\/pre><p>Next, we have to make sure Composer can be used globally and make it executable. The following commands will take care of that.<\/p><pre class=\"wp-block-preformatted\">sudo mv composer.phar \/usr\/local\/bin\/composer<\/pre><pre class=\"wp-block-preformatted\">sudo chmod +x \/usr\/local\/bin\/composer<\/pre><p>\n\n\n<div class=\"protip\">\n                    <h4 class=\"title\">Suggested Reading<\/h4>\n                    <p>Check out our article to learn more <a href=\"\/tutorials\/vps\/change-linux-permissions-and-owners\">how to change permissions and owners in Linux<\/a> to control user access in your system.<\/p>\n                <\/div>\n\n\n\n<\/p><h3 class=\"wp-block-heading\" id=\"h-5-install-laravel-on-ubuntu-using-composer\">5. Install Laravel on Ubuntu using Composer<\/h3><p>With Composer installed, now we can install Laravel. To do this, run the following command:<\/p><pre class=\"wp-block-preformatted\">composer create-project --prefer-dist laravel\/laravel [project_name]<\/pre><p>Of course, we have to replace <strong>[project_name]<\/strong> with the name of your application. In this case, we name the project example.<\/p><p>\n\n\n<div class=\"protip\">\n                    <h4 class=\"title\">Pro Tip<\/h4>\n                    <p>Explore our <a href=\"\/vps\/laravel-hosting\">Laravel VPS hosting plans<\/a>, which come with the Ubuntu 22.04 and Laravel template pre-installed for a quick launch.<\/p>\n                <\/div>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-use-laravel-for-local-development\">How to use Laravel for local development<\/h2><p>To develop applications locally, we can use PHP serve and specify the host and port of our server. To do this, execute the following commands and replace [IP] with your server IP and <strong>[port]<\/strong> with the port you wish to use.<\/p><pre class=\"wp-block-preformatted\">cd example<\/pre><pre class=\"wp-block-preformatted\">php artisan serve --host=[IP] --port=[port]<\/pre><p>Next, open your web browser and go to the server&rsquo;s IP address or domain name and the specified port. The address would look like the one displayed in the output above. If you see the screen below in your browser, you&rsquo;re ready to start working with Laravel.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1366\" height=\"666\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/laravel-landing-page.png\/public\" alt=\"Laravel landing Page on a browser\" class=\"wp-image-15600\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/laravel-landing-page.png\/w=1366,fit=scale-down 1366w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/laravel-landing-page.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/laravel-landing-page.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/laravel-landing-page.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/laravel-landing-page.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/02\/laravel-landing-page.png\/w=990,fit=scale-down 990w\" sizes=\"(max-width: 1366px) 100vw, 1366px\" \/><\/figure><\/div><h2 class=\"wp-block-heading\" id=\"h-how-to-use-laravel-to-deploy-an-application\">How to use Laravel to deploy an application<\/h2><p>On the contrary, if we are going to <a href=\"\/tutorials\/how-to-deploy-laravel\">deploy a Laravel application on our VPS<\/a>, then we have to make some adjustments to avoid problems.<\/p><p>First, we need to move the previously created project directory to the Apache web root. Remember, in our case, the folder name is Example. Execute the following command:<\/p><pre class=\"wp-block-preformatted\">sudo mv example \/var\/www\/html\/<\/pre><p>After that, set the necessary permissions to ensure the project runs smoothly:<\/p><pre class=\"wp-block-preformatted\">sudo chgrp -R www-data \/var\/www\/html\/example\/<\/pre><pre class=\"wp-block-preformatted\">sudo chmod -R 775 \/var\/www\/html\/example\/storage<\/pre><p>It is necessary to create a new virtual host for the project. It can be done easily with the commands below:<\/p><pre class=\"wp-block-preformatted\">cd \/etc\/apache2\/sites-available<\/pre><pre class=\"wp-block-preformatted\">sudo nano laravel_project.conf<\/pre><p>Add the following to create the new Virtual host. Remember to replace <strong>thedomain.com<\/strong> with your server&rsquo;s <strong>IP address<\/strong>.<\/p><pre class=\"wp-block-preformatted\">&lt;VirtualHost *:80&gt;\n&nbsp;&nbsp;&nbsp;ServerName thedomain.com\n&nbsp;&nbsp;&nbsp;ServerAdmin webmaster@thedomain.com\n&nbsp;&nbsp;&nbsp;DocumentRoot \/var\/www\/html\/example\/public\n\n&nbsp;&nbsp;&nbsp;&lt;Directory \/var\/www\/html\/example&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AllowOverride All\n&nbsp;&nbsp;&nbsp;&lt;\/Directory&gt;\n&nbsp;&nbsp;&nbsp;ErrorLog ${APACHE_LOG_DIR}\/error.log\n&nbsp;&nbsp;&nbsp;CustomLog ${APACHE_LOG_DIR}\/access.log combined\n&lt;\/VirtualHost&gt;<\/pre><p>Save the file and close it.<\/p><p>After that, disable the default configuration file of the virtual hosts in Apache with this command:<\/p><pre class=\"wp-block-preformatted\">sudo a2dissite 000-default.conf<\/pre><p>Afterwards, enable the new virtual host:<\/p><pre class=\"wp-block-preformatted\">sudo a2ensite laravel_project<\/pre><p>Enable the Apache rewrite module, and finally, restart the Apache service:<\/p><pre class=\"wp-block-preformatted\">sudo a2enmod rewrite<\/pre><pre class=\"wp-block-preformatted\">sudo systemctl restart apache2<\/pre><p>Now, open the web browser and go to the server&rsquo;s IP. If you get the same Laravel landing screen you have seen last time, you&rsquo;re ready to start working.<\/p><p>Now we can get to work with this great PHP framework.<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-uninstall-laravel-and-composer\">How to uninstall Laravel and Composer<\/h2><p>To uninstall Laravel we only have to delete the folder of the generated project. In the case &ndash; &nbsp;the Composer, the following command will be enough:<\/p><pre class=\"wp-block-preformatted\">sudo rm \/usr\/local\/bin\/composer<\/pre><p>That&rsquo;s it. Laravel is removed from your VPS.<\/p><figure class=\"wp-block-image size-large\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-vps-hosting\" href=\"\/vps-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/public\" alt=\"\" class=\"wp-image-77934\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>To develop quality web applications, you need a feature-rich PHP framework. Laravel is one of them. Here you learned how to install it on a computer or server with Ubuntu 22.04.<\/p><p>Remember, it&rsquo;s a good idea to consult the official documentation, if you want more information or if you want to learn more about the project. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are many powerful PHP frameworks, but some of them have limitations when it comes to reading the application&rsquo;s source [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/tutorials\/how-to-install-laravel-on-ubuntu\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":110,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to Install Laravel on Ubuntu with Apache","rank_math_description":"Learn how to install Laravel on Ubuntu: 1. Install Apache web server 2. Install PHP 3. Download and install database manager + more.","rank_math_focus_keyword":"install laravel ubuntu","footnotes":""},"categories":[22646,22644],"tags":[],"class_list":["post-15587","post","type-post","status-publish","format-standard","hentry","category-pre-installed-applications","category-vps"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-install-laravel-on-ubuntu","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/tutoriais\/como-instalar-laravel-ubuntu","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/installer-laravel-sur-ubuntu","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/como-instalar-laravel-en-ubuntu","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/install-laravel-di-ubuntu","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-install-laravel-on-ubuntu","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-install-laravel-on-ubuntu","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-install-laravel-on-ubuntu","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/pt\/tutoriais\/como-instalar-laravel-ubuntu","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-install-laravel-on-ubuntu","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-install-laravel-on-ubuntu","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/como-instalar-laravel-en-ubuntu","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/como-instalar-laravel-en-ubuntu","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/como-instalar-laravel-en-ubuntu","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-install-laravel-on-ubuntu","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-install-laravel-on-ubuntu","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/15587","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/users\/110"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/comments?post=15587"}],"version-history":[{"count":38,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/15587\/revisions"}],"predecessor-version":[{"id":139029,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/15587\/revisions\/139029"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/media?parent=15587"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/categories?post=15587"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/tags?post=15587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}