Installing WordPress Locally on Gentoo

Posted by Rahul on February 25, 2010 | 4 Comments

There are already a couple of informative articles on this. Good as they are, I managed to run into a couple of problems that are not detailed on these articles possibly due to the fact that they were written a long time ago. Therefore this article, to help others (and me) who in the future wish to achieve the same that I did.

USE Flags

  • dev-lang/php apache2 mysql (in addition to ones already enabled by default)
  • www-apps/wordpress vhosts

Emerge WordPress

  • emerge -av wordpress

Install WordPress using webapp-config

  • webapp-config -I wordpress 2.9 -d wordpress

Configure the MySql database

  • mysql -u root -p (login to MySql)
  • CREATE DATABASE databasename; (create a database, replacing databasename with the name that you wish to choose)
  • GRANT ALL PRIVILEGES ON databasename.* TO username@localhost IDENTIFIED by ‘password’; (Create a user for the above database, replacing username with the name that you intend to use. Similarly with password)
  • FLUSH PRIVILEGES;
  • exit

Configure WordPress

  • vi /var/www/localhost/htdocs/wordpress/wp-config.php (and verify the following settings)
// ** MySQL settings ** //
define('DB_NAME', 'wordpress');     // The name of the database
define('DB_USER', 'username');     // Your MySQL username
define('DB_PASSWORD', 'password'); // ...and password
define('DB_HOST', 'localhost');

Configure apache2

  • vi /etc/apache2/httpd.conf
  • Comment out the following line: LoadModule unique_id_module modules/mod_unique_id.so
  • Add the following to the end: ServerName localhost
  • vi /etc/conf.d/apache2
  • Add the “-D PHP5” to the options passed in APACHE2_OPTS

You are set to go

  • Start apache2: /etc/init.d/apache2 start
  • Point your browser to http://localhost/wordpress
  • Have fun

Posted in Gentoo, Linux, Open Source | Tagged , , , , , |

4 responses to “Installing WordPress Locally on Gentoo”

  1. […] Here is the original: Installing WordPress Locally on Gentoo « Muses […]

  2. Warren says:

    You misspelled privileges in the mysql part.

  3. […] far as the VM goes it runs gentoo linux and installing wordpress on it was very easy following this guide.  The only issue I ran into with wordpress is that word press uses the URL that you use to […]

Leave a Reply