How to: Deploy WordPress in Ubuntu

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

</Directory>

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$ – [L]

# add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ – [L] RewriteRule ^(wp-(content|admin|includes).*) $1 [L] RewriteRule ^(.*.php)$ $1 [L] RewriteRule . index.php [L]

Enhanced by Zemanta

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: