In this tutorial we are going to provide you with step by step instructions on how to install WooCommerce plugin on an Ubuntu 16.04 VPS.
WooCommerce is a WordPress plugin written in PHP that allows website developers to turn a WordPress website into a full-featured online store. The installation process is fairly easy and it takes only a couple of minutes.
At the time of writing this tutorial, the latest stable version of WooCommerce is 2.6.4 and it requires:
- PHP 5.6 or higher (preferably the latest), with memory_limit PHP variable set to 64 MB or higher (128 MB or higher is preferred)
- MySQL 5.6 or higher
- WooCommerce 2.6.4 requires WordPress 4.4+
- Apache Web Server 2.0 or higher compiled with mod_rewrite module.
This install guide assumes that Apache is already installed and configured on your virtual server.
Let’s start with the installation. Make sure your server OS packages are fully up-to-date:
Enable Apache rewrite module if it is not already done so:
Install required PHP packages:
Restart the Apache service for the changes to take effect:
Install WordPress
Download the latest version of WordPress available at https://wordpress.org/download/ to the /opt/ directory on the server:
Create a new MySQL database and user:
Do not forget to replace ‘y0ur-pAssW0RD’ with a strong password.
Install WooCommerce
Download the latest version of WooCommerce available at https://downloads.wordpress.org/plugin/woocommerce.latest-stable.zip to a directory on the server and extract it using the following commands:
Edit the PHP configuration file (/etc/php/7.0/cli/php.ini):
and modify the memory_limit value to 128MB or higher:
All files have to be readable by the web server, so set a proper ownership:
Create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘woocommerce.conf’ on your virtual server:
Then, add the following lines:
Remove the 000-default.conf file:
Restart the Apache web server for the changes to take effect:
Open your favorite web browser, navigate to http://your-domain.com/ and follow the easy instructions on the install screen inserting the necessary information as requested. Log in to the WordPress administration back-end at http://your-domain.com/wp-admin , go to Plugins and activate the WooCommerce plugin.
Then, go to the WordPress Dashboard, click on the ‘Run the Setup Wizard’ button below the ‘Welcome to WooCommerce’ message and configure basic WooCommerce settings.
That is it. The WooCommerce has been installed on your server.
Of course, you don’t have to do any of this if you use one of our Managed VPS Hosting services, in which case you can simply ask our expert Linux admins to install the WooCommerce plugin for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.
I would recommend nginx rather than Apache, much faster and it can all be automatically setup using easy engine with wordpress and redis cache!