WordPress is a blog application content management system.
The following applications will need to be installed in order for WordPress to have everything that's needed to work properly.
emerge --ask www-servers/apache dev-db/mysql dev-lang/php
To add PHP support into apache, you must follow the directions in the main Apache article.
First unmask www-apps/wordpress:
echo "www-apps/wordpress" >> /etc/portage/package.accept_keywords
Then install Wordpress:
emerge --ask wordpress
Fix permissions to enable uploading content (such as banners):
chown apache:apache /var/www/localhost/htdocs/wordpress/wp-content
First visit the Gentoo wiki on MySQL and get it ready.
Then, create a database for WordPress to interact with:
mysql -u root -p
mysql> CREATE DATABASE IF NOT EXISTS `wordpress` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`; mysql> CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'changeme'; mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `wordpress`.* TO 'wordpress'@'localhost'; mysql> \q
Configure WordPress to interact with the database created. Generate goodies for this file with with Wordpress' key generator
Database and database user are "wordpress" and passwords are what you set in the mysql database generation step. (changeme fields)
5 minute installer
Point a web browser to http://localhost/wordpress/
If it complains about not being able to connect to the MySQL database you set in wp-config.php, make sure to change define('DB_HOST', 'localhost') to define('DB_HOST', '127.0.0.1') in the file.
Name the website, and make create default administrator password.
Administration and use
Administer the WordPress installation at http://localhost/wordpress/wp-admin/
The shiny new blog is located at http://localhost/wordpress/
Plugins and themes
Wordpress is a bit of a permissions nightmare. Themes and plugins will ask for ftp access due to permission problems.
chown -R apache:apache wp-admin wp-includes wp-content
In case of using nginx as the webserver, first edit:
and set the user and group entries to nginx. The default values are nobody which creates problems with the permission. Then set the permission accordingly:
chown -R nginx:nginx wp-admin wp-includes wp-content
This clearly is breaking the security of the webapp. To restore security once all is set how you want it.
chown -R root:root /var/www/localhost/htdocs/wordpress