Prestashop is one of the most well-known eCommerce software in the world. It’s easy to work with and has a large variety of themes and addons which can simplify your eCommerce life.
So, in order to get your PrestaShop VPS ready, choose one of the packages of our cheap VPS services. We recommend to go with at at least the VPS Basic plan and, in order to follow up with this guide, choose CentOS 8 as the operating system.
Connect using SSH via your favorite SSH client ( ex:puTTY ). Here you can find a guide on how to connect to a vps with ssh.
Point your domain name towards the VPS by creating an A record for both the root domain, the www. subdomain and the sv. subdomain. We will use the sv.yourdomain.com as the hostname of the server.
Edit /etc/hostname with your favorite editor (nano/vi) and replace the current hostname with sv.yourdomain.com (replace yourdomain.com with your actual domain name).
Next, we set some of the php variables in /etc/php.ini using sed.
sed -i 's/;max_input_vars = 1000/max_input_vars = 5000/g' /etc/php.ini sed -i 's/post_max_size = 8M/post_max_size = 128M/g' /etc/php.ini sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 128M/g' /etc/php.ini sed -i 's/memory_limit = 128M/memory_limit = 256M/g' /etc/php.ini
We install other required php extensions and we restart apache:
dnf -y install php-zip php-bcmath php-xmlrpc php-imagick php-intl systemctl restart httpd
We create a new MySQL database and a MySQL user. the password for this mysql user is generated automatically and will be printed at the end. Please save it as you’ll need it later:
pass=$(head -c 16 /dev/random | md5sum | cut -f 1 -d\ ) echo "CREATE DATABASE prestashop;"|mysql echo "CREATE USER 'prestashop'@'localhost' IDENTIFIED BY '$pass';"|mysql echo "GRANT ALL PRIVILEGES ON prestashop. * TO 'prestashop'@'localhost';"|mysql echo "FLUSH PRIVILEGES;"|mysql echo "The db password is $pass"
Next, we’ll go to the webroot /var/www/html, download prestashop (you should check the official download page and get the latest version) and unzip it:
cd /var/www/html wget https://download.prestashop.com/download/releases/prestashop_184.108.40.206.zip dnf -y install unzip unzip prestashop_220.127.116.11.zip rm -rf prestashop_18.104.22.168.zip chown apache:apache /var/www/html -R
Access your domain name in the browser and follow up the on-screen installation wizard. When asked for the database password, enter the one you were provided earlier. The username is called “prestashop”.