CodeIgniter is an open-source MVC framework used to build dynamic PHP websites and projects such as eCommerce stores and blogs.
We have been getting many requests from our clients to add CodeIgniter as a one-click application install. We are looking into the feasibility of adding this app inside the Console. Meanwhile, we think it is a great idea to teach the users how to easily install CodeIgniter on Cloudways managed servers through the SSH terminal.
Codeigniter 4.1 Prerequisites
- PHP version 7.3 or newer is required
- PHP extensions should be enabled on your server: – php-json, php-mysqlnd, php-xml
- MySQL (5.1+)
CodeIgniter Hosting on Managed Cloud Servers
Cloudways handle server management for you so you can focus on creating great apps and keeping your clients happy.
How to Install CodeIgniter on Cloudways Servers
It is very easy to install CodeIgniter. Just follow the steps given below:
Step 1: Launch PHP Stack
Sign up or log in to your Cloudways account and launch a new PHP stack server. You can find the option under the Server Management tab and click “Add App”. Select PHP Stack, as shown in the picture.
Click Launch Now and wait for a few minutes for the optimized PHP application to be deployed on the Server.
After completing all these steps, you can finally navigate to the application tab and select the CodeIgniter application. Click on it to find further details inside:
Step 2: Log in to the SSH Terminal
Navigate to the Server Management tab and under your Master Credentials launch SSH terminal.
Step 3: Install Codeigniter Using wget Command
Now I would access the public_html folder with the following command
You have to open the SSH terminal to run the composer command to install Codeigniter. You can either use the Putty terminal or Cloudways SSH terminal as per the requirements.
Now I would access the public_html folder with the following command
LS
command is used to list files or directories in Linux
CD
use for change directory
composer create-project codeigniter4/appstarter
This will download the content of CodeIgniter on your server.
Step 4: Run it
Now go to the application management tab and copy the application URL. Paste the URL in the new tab and type /appstarter/public/index.php at the end. If you see the page as in the picture, you have downloaded it correctly.
The CodeIgniter 4.1 has been installed.
Conclusion
And we are done! This brings us to the end of this article, which details how to install CodeIgniter framework on Cloudways. You can now configure your server with your domain and start using it! Looking for a hosting provider? Haven’t you tried Cloudways yet? Now is the perfect time to Sign Up and try out our proficiently managed CodeIgniter hosting platform. You have the option of choosing any of the four major cloud infrastructure providers from DigitalOcean, Vultr, GCE, and Amazon.
To help you make an informed decision, Cloudways offers a free 3-day trial.
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]