How to Install Magento Community Edition via cPanel or FTP Client
After shooting a video tutorial on how to install Magento on Godaddy web hosting a while ago, I figured I'd shoot another video that shows people how to install Magento via cPanel or FTP client. For those of you that are not using cPanel and don't have an FTP client, I recommend FileZilla which is free to use. In the video I am installing Magento version 184.108.40.206, but strongly believe that this tutorial will be compatible with later versions since I see that not much has changed since installing version 220.127.116.11 (well at least not as far as installation is concerned).
I would also like to add that I have learned a lot about Magento since the last time I shot tutorials about it and I am becoming more and more of a fan. For example, I've learned that Magento isn't as slow as I thought and that it was mainly due to Godaddy web hosting being very slow... So if you are planning on using Godaddy, I would only recommend them for VPS and dedicated servers.
In fact, I am installing Magento on a Godaddy economy VPS in the video and just by watching, you can see how fast it is. If interested in installing Magento on a VPS or dedicated server, check out this article. So Godaddy is good when it comes to VPS or dedicated servers but bad when it comes to shared hosting.
Of course, there are some advantages to shared hosting. for example it's slightly cheaper. In addition to that, there are some hosts that offer 1-click Magento installations which makes it easier than having to manually install the software. Hostgator and SiteGround offer this.
Can't view the video? Watch it on YouTube
Prior to installing Magento, you'd want to make sure that your shared hosting account, VPS or dedicated server is ready for the software. To make sure, you can see the requirements on the Magento site. In a nutshell, you need:
- A Linux x86, x86-64 operating system
- Apache 1.3.x
- Apache 2.0.x
- Apache 2.2.x
- Nginx (starting from Magento 1.7 Community and 1.12 Enterprise versions)
- PHP version 5.2.13 - 5.3.24; or 5.4.x -- note that 5.4 and above will require you to patch Magento.
And, most importantly, you will need the PHP extensions listed below:
- SOAP (Optional if Webservices API is to be used)
If you are on a VPS or dedicated server, you will need to install the missing extensions yourself. If you are on a shared hosting account, you will need to contact your host and ask them to install the missing extensions for you.
Let's find out which extensions you need.
Download the Magento check file upload the file to your root directory and then go to 'http://yourdomain.com/magento-check.php'. If you've passed the test, you can proceed to the next step.
So, enough of that... To start, download Magento -- in my video I am downloading the zipped format.
Upload the files and folders
After downloading the installation file, simply upload the zipped file to your server via cPanel or FTP client. Note that if you are uploading the file in an archived format, that you will need to unarchive on the server side. In the video I unarchived the file on my local computer and uploaded the files and folders via my FTP client so that it's easier to understand what I am doing.
Note: Magneto installation files and directories are in a folder named 'Magento'. If you upload the folder as is, your Magento installation will install in a subdirectory. In other word, people will access your store by going to 'http://yourdomain.com/magneto' rather than 'http://yourdomain.com/' so if you want your store to be shown on 'http://yourdomain.com/', you will need to upload the files from within the 'Magento' folder directly to the root directory on your site. If uploading the archived file and unarchiving on the server side, you will need to move the files and folders to the root directory after uploading.
Create a MySQL database
After creating the database, keep the database name, username and password handy because Magento will ask you for it during the installation process.
Configure your php.ini file
Depending on the type of hosting that you have, this process will differ slightly. For example, if you are on a share hosting plan, you will need to have the php.ini file in your root directory. If you are on a VPS or dedicated server, you can have the php.ini file in your root directory or you can edit the main php.ini file.
The php.ini file basically needs the configuration from the php.ini.sample file which was included with your Magento files. If you are keeping this file where it is, simply rename it from php.ini.sample to 'php.ini'. Note that if your server is refusing to use the configuration from the php.ini file that you may need to rename it to 'php5.ini'. Also note that there are times when servers cache these files so it may take a few minutes for the server to recognize the file.
You can find out whether the server is recognizing the file by creating an 'info.php' file with the following line of code:
Now upload the 'info.php' file to your server and access that file via your browser by visiting http://yourdomain.com/info.php
Look for the section "Loaded Configuration File" to see which php.ini file is being recognized by your server.
Fixing 'PHP Extensions "pdo_mysql" must be loaded errors.'
If at anytime during the installation process you come across the error above and are sure that you have "pdo_mysql" installed on your server, you may need to add the following lines of code to the bottom of your php.ini (after any other lines of code):
This is needed because your new php.ini file is taking over the configuration of the original php.ini file.
Let's now run the Magento installation wizard
Simply go to http://yourdomain.com/install (note that if Magento is installed in a subdirectory, you will need to go to 'http://yourdomain.com/subdirectory/install').
Follow the on screen instructions and enter in the details. In the database section, enter in the details from the database that you created earlier.
My configuration in the video for web access options is as follows:
I checked 'Use Web Server (Apache) Rewrites'. Note that your server must be capable of this.
I also checked 'Use Secure URLs (SSL)' because I have an SSL certificate installed on my server.
I entered my domain with the https protocol in the 'Secure Base URL' box and I checked off 'Run admin interface with SSL' for added security.
After installing Magento
Now that you are all set, save your encryption key and be sure to make your image and cache directory writable. As explained here directories '/media' and '/var' should have 777 permissions.
Setup a cron job
After installing Magento, you should setup your cron job so that Magento can take care of scheduled tasks automatically -- more on that here.
Fix for missing browse and upload buttons
When I tried to upload my first image, I noticed that the 'Browse Files..." and "Upload Files" buttons were missing. This was due to Flash not being installed on my computer. To fix this issue, simply download Flash Player.
If you'd like to install sample data, you can follow this guide.
If you'd like to customize your new Magento store, see my article on how to install a new theme.