Permalinks & WordPress

I have often found issues when installing wordpress on a personal server (for small or medium sized office intranets) because of permalinks and buddy press. If one wants to use buddy press a s a social network system within organizations, it cannot function using default permalinks. You need to change that to anything but default, only then Buddypress works.

Before you install buddypress and several other plugins, this is what you have to do ensure permalinks work and so does buddy press.

  1. Open terminal
  2. sudo a2enmod rewrite
  3. sudo service apache2 restart
  4. I am assuming you will use virtual hosting and below will be the scenario
    1. WordPress directory is copied in /var/www/
    2. Ownership of wordpress directory is changed by using the command from /var/www/ directory : sudo chown -R www-data:www-data wordpress/
    3. a database in is created in MySQL using phpmyadmin and grant rights provided to database user
    4. Apache settings
      1. cd /etc/apache2/sites-available
      2. sudo cp default testsite
      3. sudo nano testsite
      4. The following should be the file content
      5. <VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerAlias test
        DocumentRoot /var/www/wordpress
        <Directory />
        Options FollowSymLinks
        AllowOverride None
        <Directory /var/www/wordpress/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
        </Directory>ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory “/usr/lib/cgi-bin”>
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
        </Directory>ErrorLog ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/access.log combined

        Alias /doc/ “/usr/share/doc/”
        <Directory “/usr/share/doc/”>
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from ::1/128


      6. The red marked ‘All’ is the critical one. That has to be changed from default None to All
      7. ^O
      8. ^X
      9. sudo service apache2 restart
      10. Now your permalinks should work
      11. Install all the your plugins required

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s