{"id":3369,"date":"2022-05-20T05:55:00","date_gmt":"2025-12-25T16:52:47","guid":{"rendered":""},"modified":"2025-02-02T00:46:20","modified_gmt":"2025-02-01T23:46:20","slug":"how-to-install-laravel-php-framework-on-windows-vps","status":"publish","type":"post","link":"https:\/\/netcloud24.com\/knowledgebase\/how-to-install-laravel-php-framework-on-windows-vps\/","title":{"rendered":"Linux VPS &#038; VPS Windows Setup Guide | NetCloud24 Laravel PHP Framework on Windows VPS"},"content":{"rendered":"<p>\u00a0<\/p>\n<\/p>\n<header><\/header>\n<section>\n<h2>Introduction<\/h2>\n<p><strong>Laravel<\/strong> is a popular PHP framework for developing web applications. In this guide, we will show you how to install and configure Laravel on a  with Apache, PHP, and Composer.<\/p>\n<\/section>\n<section>\n<h2>Prerequisites<\/h2>\n<p>Before you begin, ensure that you have the following:<\/p>\n<ul>\n<li>A  with administrative privileges.<\/li>\n<li>Windows VPSServer 2016 or later, or Windows VPS10\/11 installed.<\/li>\n<li>Apache Web Server installed and running.<\/li>\n<li>PHP 7.4 or later installed (preferably PHP 8.x for optimal performance).<\/li>\n<li>Composer installed on your server for managing PHP dependencies.<\/li>\n<li>Basic knowledge of using the command line interface (CLI).<\/li>\n<\/ul>\n<\/section>\n<section>\n<h2>Step 1: Install Apache, PHP, and Composer<\/h2>\n<p>If you don&#8217;t have Apache, PHP, and Composer installed, follow these steps:<\/p>\n<ol>\n<li>Download and install <a href=\"https:\/\/httpd.apache.org\/download.cgi\" target=\"_blank\" rel=\"follow\">Apache HTTP Server<\/a>.<\/li>\n<li>Download and install PHP from <a href=\"https:\/\/windows.php.net\/download\/\" target=\"_blank\" rel=\"follow\">Windows VPSPHP Downloads<\/a>.<\/li>\n<li>Ensure PHP is properly integrated with Apache by configuring the <code>httpd.conf<\/code> file with the correct <code>LoadModule<\/code> and <code>PHPIniDir<\/code> directives.<\/li>\n<li>Install Composer by downloading the installer from the official <a href=\"https:\/\/getcomposer.org\/download\/\" target=\"_blank\" rel=\"follow\">Composer website<\/a>.<\/li>\n<li>Verify PHP, Apache, and Composer installation by checking their versions:\n<pre>php -v<\/pre>\n<pre>composer -v<\/pre>\n<\/li>\n<\/ol>\n<\/section>\n<section>\n<h2>Step 2: Install Laravel Using Composer<\/h2>\n<p>Now that you have Composer installed, you can easily install Laravel:<\/p>\n<ol>\n<li>Open a command prompt or PowerShell window.<\/li>\n<li>Navigate to the directory where you want to install Laravel, for example:\n<pre>cd C:\\wamp\\www<\/pre>\n<\/li>\n<li>Run the following command to create a new Laravel project:\n<pre>composer create-project --prefer-dist laravel\/laravel your-project-name<\/pre>\n<\/li>\n<li>This will download and install Laravel and its dependencies in a folder named <code>your-project-name<\/code>.<\/li>\n<\/ol>\n<\/section>\n<section>\n<h2>Step 3: Configure Apache for Laravel<\/h2>\n<p>Next, configure Apache to serve your Laravel application:<\/p>\n<ol>\n<li>Open the Apache configuration file, typically located at <code>C:\\Apache24\\conf\\httpd.conf<\/code>.<\/li>\n<li>Ensure that the <code>mod_rewrite<\/code> module is enabled by checking that the following line is not commented out:\n<pre>LoadModule rewrite_module modules\/mod_rewrite.so<\/pre>\n<\/li>\n<li>Configure the <code>DocumentRoot<\/code> to point to the public directory inside the Laravel project folder. For example:\n<pre>DocumentRoot \"C:\/wamp\/www\/your-project-name\/public\"<\/pre>\n<pre>&lt;Directory \"C:\/wamp\/www\/your-project-name\/public\"&gt;<\/pre>\n<pre>    Options Indexes FollowSymLinks<\/pre>\n<pre>    AllowOverride All<\/pre>\n<pre>    Require all granted<\/pre>\n<pre>&lt;\/Directory&gt;<\/pre>\n<\/li>\n<li>Restart Apache to apply the changes.<\/li>\n<\/ol>\n<\/section>\n<section>\n<h2>Step 4: Set Up Environment Variables for Laravel<\/h2>\n<p>Ensure that you configure your Laravel environment settings:<\/p>\n<ol>\n<li>Navigate to the Laravel project directory and copy the <code>.env.example<\/code> file to <code>.env<\/code>:\n<pre>cd your-project-name<\/pre>\n<pre>copy .env.example .env<\/pre>\n<\/li>\n<li>Generate the application key by running the following command:\n<pre>php artisan key:generate<\/pre>\n<\/li>\n<li>Update the <code>.env<\/code> file with your database connection and other application settings.<\/li>\n<\/ol>\n<\/section>\n<section>\n<h2>Step 5: Set Up Database for Laravel<\/h2>\n<p>Laravel uses a database to store application data. If you haven\u2019t set up a database yet, follow these steps:<\/p>\n<ol>\n<ol>\n<li>Install MySQL or MariaDB on your  if you haven\u2019t already done so.<\/li>\n<li>Create a new database for your Laravel application:<\/li>\n<\/ol>\n<\/ol>\n<pre>CREATE DATABASE laravel_db;<\/pre>\n<ol>\n<li>Update the <code>DB_DATABASE<\/code>, <code>DB_USERNAME<\/code>, and <code>DB_PASSWORD<\/code> fields in your <code>.env<\/code> file to reflect the database you just created.<\/li>\n<\/ol>\n<\/section>\n<section>\n<h2>Step 6: Verify Laravel Installation<\/h2>\n<p>Finally, verify that Laravel is working by visiting your server&#8217;s IP address or localhost in a browser. For example, visit:<\/p>\n<ul>\n<li><code>http:\/\/localhost<\/code> or <code>http:\/\/your-server-ip<\/code>.<\/li>\n<\/ul>\n<p>If everything is set up correctly, you should see the Laravel welcome page.<\/p>\n<\/section>\n<section>\n<h2>Conclusion<\/h2>\n<p>Congratulations! You have successfully installed Laravel on your . You can now start building your web applications with Laravel\u2019s powerful features.<\/p>\n<\/section>\n<footer>\n<p>\u00a9 2024 Your Company. All rights reserved.<\/p>\n<\/footer>\n<div class=\"post-author-box\" style=\"border-top:1px solid #ddd;margin-top:20px;padding-top:15px;\">\n<p><strong>Author:<\/strong> \u0141ukasz Bodziony<\/p>\n<p><strong>Website:<\/strong> <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a><\/p>\n<p><em>\u0141ukasz Bodziony is the CEO and founder of <a href=\"https:\/\/netcloud24.com\" target=\"_blank\" rel=\"dofollow\">NETCLOUD24<\/a>, a global VPS hosting brand proudly originating from Poland. With extensive experience in cloud computing, virtualization, and server management, he delivers high-performance <strong>Windows VPS<\/strong> and <strong>Remote Desktop Services (RDS)<\/strong> solutions to clients across Europe, North America, and beyond.<\/em><\/p>\n<p><em>His expertise covers a wide range of technologies, including <strong>Microsoft Azure<\/strong>, <strong>Proxmox VE<\/strong>, <strong>Amazon Web Services (AWS)<\/strong>, and numerous other virtualization and cloud platforms.<\/em><\/p>\n<p><em>Beyond running his hosting business, \u0141ukasz also provides <strong>professional paid server configuration and optimization services<\/strong> for companies and individuals. Outside of work, he is dedicated to caring for his children and building a secure future for them.<\/em><\/p>\n<p><em>If you are interested in working with him or need expert assistance with your hosting, cloud environment, or server setup, feel free to reach out via <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a>.<\/em><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 Introduction Laravel is a popular PHP framework for developing web applications. In this guide, we will show you how to install and configure Laravel on a with\u2026<\/p>\n","protected":false},"author":1,"featured_media":3421,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[],"tags":[14,12,11,23,20,21,22,17,7,8,6,10,18,19,15,24,16,5,13,9],"class_list":["post-3369","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-cheapvps","tag-cloudvps","tag-hostingvps","tag-rds","tag-rdscal","tag-remotedesktop","tag-remotedesktopvps","tag-servervps","tag-ukvps","tag-virtualserver","tag-vpshosting","tag-vpsserver","tag-vpssolutions","tag-vpswindows","tag-vpswithwindows","tag-windowsrds","tag-windowsserver","tag-windowsvps","tag-windowsvpshosting","tag-windowsvpsuk"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/3369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=3369"}],"version-history":[{"count":0,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/3369\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media\/3421"}],"wp:attachment":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=3369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=3369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=3369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}