Note: This article was originally published in 2013. Some steps, commands, or software versions may have changed. Check the current Ubuntu documentation for the latest information.
In this step-by-step guide, you’ll learn deploy wordpress in ubuntu. Ubuntu is a popular Linux distribution based on Debian, widely used for servers and development environments.
Prerequisites
Before you begin, make sure you have:
- A system running Ubuntu (desktop or server edition)
- Terminal access with sudo privileges
- Basic familiarity with Linux command line
How to: Deploy WordPress in Ubuntu
Text goes here
I. Enable Apache Modules that are commonly used by plugins:
To enable a module:
sudo a2enmod module_name
To disable a module:
sudo a2dismod module_name
So to begin, here are a list of modules you might need:
- sudo a2enmod expires
- sudo a2enmod headers
And don’t forget that once you enable said modules you’ll need to restart Apache web server:
- sudo service apache2 restart
I. For Multisite to work, you need Mod-rewrite to work as well (Apache Virtual Hosts and Mod Rewrite)
To enable mod_rewrite to work within an Apache Virtual host you may need to set some options on the DocumentRoot.
<VirtualHost *:80> DocumentRoot /var/www/vhosts/wordpress <Directory /var/www/vhosts/wordpress> AllowOverride Fileinfo Options
In some instances, you will need to add All to your AllowOverride for all htaccess rules to be honored.
I. Configure .htaccess
You’ll need to add the following lines to make Multisite work:
RewriteEngine On RewriteBase / RewriteRule ^index.php$ - # add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ RewriteCond %{REQUEST_FILENAME} -f RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - RewriteRule ^(wp-(content|admin|includes).) $1 RewriteRule ^(..php)$ $1 RewriteRule . index.php
(http://img.zemanta.com/zemified_e.png?x-id=6af8e6f7-67b0-4c24-97c8-224e9af9369f)](http://www.zemanta.com/?px “Enhanced by Zemanta”)
Summary
You’ve successfully learned deploy wordpress in ubuntu. If you run into any issues, double-check the prerequisites and ensure your Ubuntu environment is properly configured.