Question

I recently got a theme for an e-commerce website how can I install this extensions for php?

Hello everyone, I’m a jr. software developer and I need to install this pre-requisites before being able to upload a e-ecommerce site into my server.

It’s my first time using DigitalOcean, can someone instruct me into doing so? I really appreciate it!

steps I’ve taken:

  1. followed every step in this tutorial to create and configure the basics of the server: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-ubuntu-18-04#step-3-—-installing-php

This are the theme requirements:

Make sure you’ve sudo privilege on the server and access to command line tool and also have full access to the MySQL database.

PHP & Extensions PHP version >= 7.2 OpenSSL MySQLi sqlite3 PDO_sqlite PDO SQLite Mbstring Tokenizer XML Ctype JSON cURL Fileinfo ZipArchive exif GD pcntl memchached

Apache Be sure to enable the mod_rewrite module so the .htaccess file will be honored by the server. If you’re using a shared hosting be sure the symlink() function is enabled on our server. Some shared server disable this function.

Configuration ( php.ini ) post_max_size=512M or more upload_max_filesize=512M or more max_execution_time=300 or more


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

@KFSys hi there, thanks for the answer but I’m trying to install a laravel theme.

theme: https://codecanyon.net/item/zcart-multivendor-ecommerce-platform/22751042

Hi @305gm,

Installing the said extensions can be done in a few simple steps.

I’ll assume you’ve installed Apache already, however, in case you haven’t I’ll recommend following the mentioned tutorial in your Question to do so.

Firstly, to be able to install a certain PHP version, in this case, 7.2 you’ll need to add a certain repository to your system

sudo apt-add-repository ppa:ondrej/php

Update the repository index.

sudo apt update

Now, I do recommend installing 7.3 rather than 7.2 as it’s newer and recommended from WordPress as a whole. Install PHP 7.3 with the below command.

sudo apt install -y php7.3 php7.3-cli php7.3-common

The following extensions are required to install and run WordPress on Ubuntu. WordPress recommends having PHP v7.3 for the installation.

sudo apt install -y php7.3-mysql php7.3-dom php7.3-simplexml php7.3-ssh2 php7.3-xml php7.3-xmlreader php7.3-curl  php7.3-exif  php7.3-ftp php7.3-gd  php7.3-iconv php7.3-imagick php7.3--json  php7.3-mbstring php7.3-posix php7.3-sockets php7.3-tokenizer

The above are the required extensions for your WordPRess installation as for the theme itself, you can run the following command as well

sudo apt install -y php7.3-mysqli php7.3-pdo  php7.3-sqlite3 php7.3-ctype php7.3-fileinfo php7.3-zip php7.3-exif

That’s it, you now have your PHP version installed.

Regards, KFSys