
With 840,413 live websites (as of the time of writing) and 8% of the market share, Laravel has been one of the foremost well known PHP frameworks for many years now. It’s elegant, and scalable has become one of the landmark frameworks for developers and companies working with PHP.
Laravel 9 is the first-ever Long Term Back (LTS) released in a 12-month release cycle. In this article, we’ll quickly look at its prerequisites and features before showing you how to install it on Cloudways.
What are Laravel 9 Prerequisites?
Laravel 9 requires the following:
What’s New with Laravel 9?
Laravel 9 brings with it some major new features. These are some of the most noteworthy ones:
- New design for routes list: With this change, it becomes much easier to oversee big routes within the console.
- Default Anonymous Stub Migrations.
- Theme improvement: You can now customize or select accessible themes at your convenience.
- New Query Builder Interface
- PHP string function: The new version focuses on utilizing string function that incorporates str_contains()
- Default timeout in HTTP clients of 30 seconds.
- Shift from SwiftMailer to Symfony Mailer for more consistency for your application.
You can read more about the latest Laravel 9 features in detail here.
How to Install Laravel 9 on Cloudways (Easy Steps)
Launch Laravel 9 on Cloudways is super easy and is done in minutes by following the steps below:
- Sign up or log in to the Cloudways Platform.
- Click Launch Now to add a new server.
- Select your server and application.
- Choose the Laravel server size as per your website traffic.
- Select your Server Location according to your preferred region.
- Click Launch Now to launch your server
- There you go, you’ll have your Laravel 9 installed on Cloudways in minutes.
How to Install Laravel 9 on Your Existing Server
In case you run the installation process on your existing Cloudways PHP 7.4 by default server, you will receive an error, because Laravel 9.x requires a minimum PHP version of 8.0.
No need to worry; you can quickly upgrade to PHP 8.0, 8.1 and 8.2 on Cloudways almost instantly.
Switching PHP Versions on Cloudways
- Sign in to the Cloudways Platform
- Click Servers on the top-left to access the server management
- Click Settings & Packages
- Click Packages
- You’ll see the currently installed PHP version; click the edit button on its side to upgrade from PHP 7.x to PHP 8.0 or PHP 8.2
- The update process takes a few minutes. Your server will be updated without any downtime.
- That’s it! It’s that easy to change your PHP version using Cloudways Platform.
Nothing as Easy as Deploying Laravel Apps on Cloud
With Cloudways, you can have your PHP apps up and running on managed cloud servers in just a few minutes.
- Next, to verify that PHP 8 is available on your server, launch the SSH terminal from the Master Credentials tab and log in using your credentials.
- Use the
php -v
command to check the installed PHP version.
Open the SSH terminal and run the Composer command to start the Laravel 9 installation process on the server. You can either use the Putty terminal or Cloudways SSH terminal as per the prerequisites.
Let’s start with Cloudways SSH terminal. Go to the application public_html folder and type the following Laravel installation command:
command composer create-project laravel/laravel:^9.0 test-app.
Now, go to your application path: APPLICATION-URL/test-app/public/, where you will see the following screen.
Conclusion
Cloudways offers a convenient platform to install Laravel 9 and host your application on different cloud servers. This also gives you access to Cloudways features on top of Laravel 9’s, including a free SSL certificate by Let’s Encrypt, an optimized PHP stack, CloudwaysBot for prompt notifications, vertical scaling, and top-notch specialized support.
Shahzeb Ahmed
Shahzeb is a Digital Marketer with a Software Engineering background, works as a Community Manager — PHP Community at Cloudways. He is growth ambitious and aims to learn & share information about PHP & Laravel Development through practice and experimentation. He loves to travel and explore new ideas whenever he finds time. Get in touch with him at [email protected]