Step by Step Guide on How to Install PrestaShop 1.5.x

In my last video tutorial I installed Magento on a Godaddy web hosting account and I was quite disappointed with Magento's performance and how difficult the installation process was. PrestaShop on the other hand performs well and I was happy with how smooth the installation process went.

I did, however, run into some problems when I tried uploading product images because I kept getting the message "an error occurred during the image upload". At first I thought that my folder permissions were wrong so I tried adjusting them and it didn't work.

I then started searching Google only to find out that most of the bugs being discussed were about older versions and not the 1.5.2 that I was installing. So after hours of trying to diagnose the issue, I decided to try and upload my images from a Windows PC with Internet Explorer (I was using Safari on a Mac prior to this) and it worked. 

So it seems that PrestaShop isn't Mac friendly (I tried both Safari and Firefox on my Mac and none of them worked). I also searched whether other people have experienced this issue and came across a bug report here. Hopefully the PrestaShop team will fix this issue.

In the video and written tutorial below I go through the step by step process of installing PrestaShop on Godaddy. Of course you can use a lot of the information in this tutorial to setup PrestaShop with other hosting providers.


Can't view the video? Watch it on YouTube

On a side note, you can always hire a freelancer over here to install the software for you. Now, if you'd prefer to install the software yourself but are looking for a faster way to do it, know that Hostgator offers quick installs -- for more information, please see this link.

Download the files below:

Get the lastest PrestaShop download. In this tutorial I downloaded v1.5.2 which is a zipped file. If possible, try to keep the file archived because it's faster than uploading an unzipped file.

If you are on a Mac and running Safari as I am, you will need to adjust your browser settings to keep the file from getting unarchived. To do this, click Safari then preferences and then General and untick the Open "safe" files after downloading option.

If using Internet Explorer check whether the files are automatically unarchived upon downloading. If they do get unarchived, adjust your settings so that the file remains archived.

Download the FileZilla FTP client. If you're using your own FTP client, it's not necessary to download FileZilla.

Note that I am using Godaddy's web based FTP client to unarchive, move, edit and delete files and directories. I am only using FileZilla to upload the file due to Godaddy's web based client timing out due to the file being large.

Preparation:

My Godaddy web hosting account is running the Linux OS but looks like you can use a different OS as well. See more details about PrestaShop's system requirements here.

Begin the installation process:

Now we need to go to godaddy.com to get our hosting account log in credentials. You will need you host IP address which can found on the start page of your Godaddy web hosting control panel. It's in the server details section.

Copy that IP address and enter it into the host field of FileZilla. Then enter your username and password (you were asked to create a username and password when you first setup this hosting account) and click the quick connect button.

After you've logged in, locate the PrestaShop file and upload it to Godaddy by double clicking the file.

Next, let's go back to our Godaddy control panel and in the server details section, look for the absolute hosting path section (you may need to click show details to view this section) and copy that path and paste it onto your clipboard because we will need it later on in the tutorial.

In the video tutorial I decided to use Godaddy's web based FTP file manager to edit, move, rename, create and delete files. Of course you can use a different FTP client (even FileZilla) to perform these actions but I figured Godaddy's FTP file manager would work better for this tutorial.

So let's access this file manager by going to our Godaddy hosting control panel and clicking the FTP file manager icon.

Once you are in the FTP file manager, locate your PrestaShop file (the one you just uploaded) and tick the box next to it and click the unarchive icon. Select the root directory as the destination and click the ok button. Once the file has been unarchived, you can delete the archived PrestaShop file.

Now you will notice a new directory named "prestashop". This directory contains your PrestaShop installation files.

In this tutorial, I am installing prestashop in the root directory of my web hosting account. For this reason, we will be moving the files from within the prestashop directory to the root directory. We are doing this so that people can access our store by simply entering the website's URL -- for example, http://www.yourdomain.com/ 

If we were to keep the files in the prestashop directory, people would visit our store by visiting: http://www.yourdomain.com/prestashop/

To move the files and directories from within the prestashop directory, simply go into that directory, tick off all of the box, click the move icon, select your root directory as the destination (in my case it was html) and click the ok button. Be sure to move all the files and directories prior to proceeding to the next step.

Once you have moved all the files and directories from within the prestashop directory, you can delete it.

Now simply enter your store's URL in a new browser window or tab and hit enter (the Prestashop installation wizard will begin the installation process).

On the 2nd step of the installation wizard (After you have selected your language and agreed to the PrestaShop terms and agreement) the wizard will run a system compatibility test.

If your configuration is valid, the wizard will allow you to proceed to the next step. If it's not, you will have to reconfigure your system so that it validates.

In my case, the configuration was valid and I believe that yours will be valid as well if you are using Godaddy.

Configuring your hosting account (optional):

The wizard did, however, recommend that I turn off the Magic Quotes in PHP. This next step isn't really necessary to install PrestaShop, but I decided to turn off Magic Quotes anyway.

If your configuration passed the PrestaShop test and you'd prefer to skip the next few steps, you can. To turn off Magic Quotes we need to edit our php.ini file. This file is in the root directory of your web hosting account. Edit the php.ini file and paste the line from below into it:

magic_quotes_gpc = Off

There is also another line in the php.ini file that needs to be turned on. It's the allow_url_fopen variable. While the installation wizard doesn't tell us this, I came across a message in the admin section telling me to turn it on. So locate the line: allow_url_fopen and change the value to on. If you do not see this variable in your php.ini file, you can paste the line below into it:

allow_url_fopen = On

Also you will want to enter a value for upload_tmp_dir. While the default setting in php.ini is set to /tmp, I had difficulty with that setup and had to use an absolute path. Therefore, you will want to change the value from /tmp to the absolute path of your web hosting account and append /tmp to the end of it (earlier in this tutorial I asked you to copy this path from the server details section of your hosting control panel).

The path should look something like this:

upload_tmp_dir = /home/content/y/o/u/yourusername/html/tmp

Don't forget to make sure that the tmp directory exists. If it doesn't, create the directory.

I also ran into a little problem with my sessions directory. Prestashop was basically unable to write session files so I had to set an absolute path for the session.save_path variable as well.

I simply used the same path that I used for upload_tmp_dir.

If you'd like to use a different path, you can but my setup looks something like this:

session.save_path = /home/content/y/o/u/yourusername/html/tmp

Next, I had to rename php.ini to php5.ini. If your server can read the configuration from the php.ini file, then you don't need to do this but in my case it was necessary. 

Note that it can take about 5-20 minutes for the changes to take effect. You can check whether the changes have taken affect by uploading a file to your root directory with the code below pasted into it:

<?php echo phpinfo();?>

I named this file info.php but you can name it something else. Now, to view your server's configuration, simply point your web browser at:

http://www.yourdomain.com/info.php

And look for the magic_quotes_gpc variable that we turned off in the php.ini file. If this variable is set to off, it means that the changes have taken effect.

Now we proceed by going back to our PrestaShop wizard installer. On the shop configuration page, you will be asked to enter in the information of your database. 

Create your MYSQL database:

If you haven't created a database already, create one by following the steps below:

Go back to the Godaddy FTP manager and hover over Databases and click the MYSQL link.

Now we click "add one now" and populate the required fields.

Next we click "ok" and wait for the database to be setup.

Once the database has been setup, we click the actions button and then "Details" and you will see a popup.

In that popup look for the hostname section and copy that URL and paste it into the "Database server address" field of your PrestaShop wizard installer.

Next fill in the "Database name", "Database login" and "Database password" fields with your databases' information.

Enter in your email address in the E-mail delivery set-up field and hit next.

On the next screen you will be asked to enter your contact details. There is also a section that asks you whether PrestaShop should populate your store with demo products. If you're setting up a real store, you will most likely want to select "no".

Once you have finished entering your information, hit next.

At this point, your PrestaShop installation should be complete.

You will see two links (one to the back office and one to the front office) click the back office link to manage your store.

Prior to being able to log in the admin section, you will be asked to delete the "install" directory and rename the admin directory to something a bit less predictable (for security purposes). You can rename the admin folder to anything you'd like.

After you have deleted the install directory and renamed the admin directory, you will access the admin section by visiting: http://www.yourdomain.com/renamed_admin_directory/

At this point your store has been setup. You can now add products and configure it to your liking.

Since I can only assume that most people will want to give their store a personal touch, I have decided to write this tutorial (includes a video) on installing a new theme -- hope you find it useful.

Comments

Ana's picture

Você é ótimo. Obrigada pela dica, foi tudo super certo!!
zen's picture

I would like to why I should set allow_url_fopen =on. I have read some article on web which says it should be off for security reasons
Danny's picture

Hey Zen,

Security is very important so it's good that you are taking it seriously.

allow_url_fopen=on allows a script to use the PHP fopen function which is used to retrieve remote files. I don't know exactly when PrestaShop uses fopen (might be for retrieving data from the PrestaShop website) but if you leave allow_url_fopen off, you will get a message in your admin panel alerting you to turn it on -- at least this is the message that I got.

If you feel uncomfortable turning this on, check if only the backend needs to retrieve remote files. If this is the case, simply leave allow_url_fopen off. I only turned it on because PrestaShop was complaining.

As for security, it depends on your script and how it was written. If written properly, there are no issues. It's basically said that it causes a threat when you pass unfiltered user provided data to the fopen function.
Joei's picture

HI! I do not want the prestashop to be my root folder. I prefer for you to go to my already built (actually still under construction) website and once you click on "SHOP" it take you to the online store. Is this possible? If so, could you please explain? Thank you so much!
Danny's picture

It is possible but you will need to decide on what to display on the homepage. Are you looking to just build a simple welcome page or are you looking to install a blog and link from there to the shop? If you're looking to install a blog, you can use WordPress and Godaddy actually offers 1 click WordPress installation.

Either way, to install PrestaShop separately, you can follow my video and instead of moving the files from the PrestaShop folder, just leave them there. Then just follow the rest of the installation steps. So after the install, your store would be accessed via the URL: http://www.yourdomain.com/prestashop/ -- when linking to your shop, you would link to that URL.

Now, if you'd prefer to rename the prestashop directory to shop or something else, you just rename the directory to whatever you want prior to installing the software. So if you'd like to name the directory shop, the URL would look like this: http://www.yourdomain.com/shop/

Thanks for stopping by!
Joei Vogt's picture

HI! I have my website already set up (still working on some items), but yes, I just want to be able to click on the "SHOP" link on my homepage to be taken to the Prestashop Store. So, does this mean I still need to download the prestashop software into the root folder? But just leave them in the Prestashop folder? Thank you so much for your help!
Danny's picture

Yes that is correct, you still have to move the installation files and folders into the root but just keep the files within the prestashop folder. Keep in mind that you can change the name of the folder to whatever you want.
Bernie's picture

Hi awesome video! I am using prestashop version 1.5.4 and I have this erros
Yes No URL rewriting (mod_rewrite) is not active on your server, or it is not possible to check your server configuration. If you want to use Friendly URLs, you must activate this mod.

How can I fix it? Thanx!

this is my php5.ini file

register_globals = off
allow_url_fopen = on

expose_php = Off
max_input_vars = 1300
max_input_time = 60
variables_order = "EGPCS"
extension_dir = ./
upload_tmp_dir = /tmp
precision = 12
SMTP = relay-hosting.secureserver.net
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="
magic_quotes_gpc = Off;
magic_quotes_runtime = Off;
magic_quotes_sybase = Off;



; Only uncomment zend optimizer lines if your application requires Zend Optimizer support

;[Zend]


zend_extension = /var/chroot/home/content/46/10800346/html/ioncube/ioncube_loader_lin_5.3.so

;zend_optimizer.optim
ization_level=15
;zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
;zend_exten
sion_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
;zend_extension=/usr/local/Zend/li
b/Optimizer-3.3.3/ZendExtensionManager.so
;zend_extension_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
/ZendExtensionManager_TS.so


;



-- Be very careful to not to disable a function which might be needed!
; -- Uncomment the following lines to increase the security of your PHP site.

;disable_functions = "highlight_file,ini_alter,ini_restore,openlog,passthru,
; phpinfo, exec, system, dl, fsockopen, set_time_limit,
; popen, proc_open, proc_nice,shell_exec,show_source,symlink"
Danny's picture

I have another video that goes over how to enable URL rewrites over here: https://www.youtube.com/watch?v=RqAgCExLTAc

As far as php5.ini is concerned, I see nothing wrong with it and if you are on Godaddy, I don't think you should have problems enable SEO friendly URLs since I enabled them without any problems. I think the problem is coming from your .htaccess file since that is the file that enables URL rewrites. Based on the error, I believe that PrestaShop can't modify the file which isn't all that odd since many CMSs require you to modify the .htaccess file manually anyway. For this reason, I'd try to modify the file myself.
caris's picture

Hello I followed all your steps.
But every time i try to install, after accepting the license agreement and click the next button, nothing happens.
I have edited the session.save_path. still no luck.

I called godaddy and they don't know what t do either.
Any pointers will be highly appreciated.

Thanks
Danny's picture

To me it sounds like something just isn't setup properly. Keep in mind that if just one file is misplaced, your entire install won't work.

Personally, I would look over the file structure and make sure that each of the folders are where they should be. You know, when you install things it's easy to delete or accidentally leave a folder behind or put it in the wrong location.

I know it might sound like a pain, but try to delete everything including the database setup and start over and do everything slowly. I know this is what I recommend to people running into problems and most people fix the errors when doing things over again.
caris's picture

Thanks! It finally worked.... i basically went back n followed the steps again.

Thanks!
Danny's picture

Glad it worked. In most cases, patience is all you need so I'm glad this was the case here as well.
Dennis's picture

Hi Danny,
I'm having trouble to install prestashop on godaddy . Every time I try to connect my server on filezilla "Error: Critical error Error: Could not connect to server" keeps coming up . Any ideas what went wrong ?

Regard
Dennis
Danny's picture

I would make sure that I am entering my info into Filezilla correctly. Also double check your login credentials. To do this, go to your Godaddy hosting control panel and look for the link "Files & FTP" at the top. From there, you will see the rest of the info.

If that doesn't work, I'd contact Godaddy to make sure that the FTP connection is being blocked by the server.

Add new comment