{"id":20087,"date":"2016-09-26T07:47:51","date_gmt":"2016-09-26T12:47:51","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=20087"},"modified":"2022-12-29T11:07:22","modified_gmt":"2022-12-29T17:07:22","slug":"how-to-install-woocommerce-plugin-on-an-ubuntu-16-04-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-woocommerce-plugin-on-an-ubuntu-16-04-vps\/","title":{"rendered":"How to install WooCommerce plugin on an Ubuntu 16.04 VPS"},"content":{"rendered":"
This install guide assumes that Apache is already installed and configured on your virtual server<\/a>.<\/p>\n Let’s start with the installation. Make sure your server OS packages are fully up-to-date:<\/p>\n Enable Apache rewrite module if it is not already done so:<\/p>\n Install required PHP packages:<\/p>\n Restart the Apache service for the changes to take effect:<\/p>\n Download the latest version of WordPress available at https:\/\/wordpress.org\/download\/ to the \/opt\/ directory on the server:<\/p>\n Create a new MySQL database and user:<\/p>\n Do not forget to replace ‘y0ur-pAssW0RD’ with a strong password.<\/p>\n 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:<\/p>\n Edit the PHP configuration file (\/etc\/php\/7.0\/cli\/php.ini):<\/p>\n and modify the memory_limit value to 128MB or higher:<\/p>\n All files have to be readable by the web server, so set a proper ownership:<\/p>\n Create a new virtual host directive in Apache. For example, create a new Apache configuration file named \u2018woocommerce.conf\u2019 on your virtual server:<\/p>\n Then, add the following lines:<\/p>\n Remove the 000-default.conf file:<\/p>\n Restart the Apache web server for the changes to take effect:<\/p>\n 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.<\/p>\n <\/p>\n 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.<\/p>\n That is it. The WooCommerce has been installed on your server.<\/p>\n Of course, you don\u2019t have to do any of this if you use one of our Managed VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to install the WooCommerce plugin<\/strong> for you. They are available 24×7 and will take care of your request immediately.<\/p>\n PS.<\/strong><\/span> 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.<\/p>\n <\/p>\n","protected":false},"excerpt":{"rendered":" In this tutorial we are going to provide you with step by step instructions on how to install WooCommerce plugin … <\/p>\n
\nIn 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<\/a><\/strong>.
\nWooCommerce 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.
\nAt the time of writing this tutorial, the latest stable version of WooCommerce is 2.6.4 and it requires:
\n<\/p>\n\n
apt-get update \r\napt-get upgrade<\/pre>\n
a2enmod rewrite<\/pre>\n
apt-get install php7.0-cli php7.0-common php7.0-mcrypt php7.0-mysql php7.0-xml php7.0-curl php7.0-zip php7.0-gd<\/pre>\n
service apache2 restart<\/pre>\n
Install WordPress<\/h3>\n
cd \/opt\/\r\nwget https:\/\/wordpress.org\/latest.zip\r\nunzip latest.zip -d \/var\/www\/html\/<\/pre>\n
mysql -u root -p\r\nmysql> SET GLOBAL sql_mode='';\r\nmysql> CREATE DATABASE wpdb;\r\nmysql> CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'y0ur-pAssW0RD';\r\nmysql> GRANT ALL PRIVILEGES ON wpdb.* TO 'wpuser'@'localhost';\r\nmysql> FLUSH PRIVILEGES;\r\nmysql> quit<\/pre>\n
Install WooCommerce<\/h3>\n
cd \/opt\/\r\nwget https:\/\/downloads.wordpress.org\/plugin\/woocommerce.latest-stable.zip -O woocommerce.zip\r\nunzip woocommerce.zip -d \/var\/www\/html\/wordpress\/wp-content\/plugins\/\r\n<\/pre>\n
vi \/etc\/php\/7.0\/cli\/php.ini<\/pre>\n
memory_limit = 128M<\/pre>\n
chown www-data:www-data -R \/var\/www\/html\/wordpress\/<\/pre>\n
touch \/etc\/apache2\/sites-available\/woocommerce.conf\r\nln -s \/etc\/apache2\/sites-available\/woocommerce.conf \/etc\/apache2\/sites-enabled\/woocommerce.conf\r\nvi \/etc\/apache2\/sites-available\/woocommerce.conf<\/pre>\n
<VirtualHost *:80>\r\nServerAdmin admin@your-domain.com\r\nDocumentRoot \/var\/www\/html\/wordpress\/\r\nServerName your-domain.com\r\nServerAlias www.your-domain.com\r\n<Directory \/var\/www\/html\/wordpress\/>\r\nOptions FollowSymLinks\r\nAllowOverride All\r\nOrder allow,deny\r\nallow from all\r\n<\/Directory>\r\nErrorLog \/var\/log\/apache2\/your-domain.com-error_log\r\nCustomLog \/var\/log\/apache2\/your-domain.com-access_log common\r\n<\/VirtualHost>\r\n<\/pre>\n
rm \/etc\/apache2\/sites-enabled\/000-default.conf<\/pre>\n
service apache2 restart<\/pre>\n
\n