How To Install WordPress on Fedora 18 / 19
Looking to start working on WordPress sites, developing new themes or just want to hack around on it? Well what better place to start then on your system. This post covers how to install WordPress on your Fedora 18/19 install. So let’s get started!
First we will need to install the dependencies for WordPress which comprise of,httpd, PHP 5.2.x, mysql-server and eventually WordPress itself. With the PHP installation I am adding a bit more than needed.
First we need to install MySQL server, this is MariaDB for Fedora 19 users. For Fedora 18.
$ sudo yum install mysql mysql-server
For Fedora 19
$ sudo yum install mariadb mariadb-server
Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server:
For Fedora 18 / 19:
$ sudo systemctl enable mysqld.service $ sudo systemctl start mysqld.service
Next we need to configure MySQL and set the admin password using mysql_secure_installation, type:
$ sudo mysql_secure_installation
Next piece of the puzzle is Apache2 which is available as a Fedora package called httpd, type the following command:
$ sudo yum install httpd
Make a change to the /etc/httpd/conf/httpd.conf and uncomment and edit the ServerName value to your systems name or set it to localhost if you have a default Fedora installation. Now configure your system to start Apache at boot time and start it.
$ sudo systemctl enable httpd.service $ sudo systemctl start httpd.service
We can install PHP5 and the Apache PHP5 module as follows:
$ sudo yum install php php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-magickwand php-mbstring php-mcrypt php-mssql php-shout php-snmp php-soap php-tidy
We must restart Apache afterwards:
$ sudo systemctl restart httpd.service
APC is a free and open PHP opcode cacher for caching and optimizing PHP intermediate code. It’s similar to other PHP opcode cachers, such as eAccelerator and Xcache. It is strongly recommended to have one of these installed to speed up your PHP page.
APC can be installed as follows:
$ sudo yum install php-pecl-apc
Now restart Apache2:
$ sudo systemctl restart httpd.service
Create the WordPress Database
Login to MySQL
$ mysql -u root -p
create database wordpress; grant all privileges on wordpress.* to wordpress identified by 'my_super_password'; flush privileges; exit;
Now install WordPress
$ sudo yum install wordpress
Now we need to make a few changes to the wp-config.php file to connect to the database.
$ sudo vi /etc/wordpress/wp-config.php
// ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define('DB_NAME', 'database_name_here'); /** MySQL database username */ define('DB_USER', 'username_here'); /** MySQL database password */ define('DB_PASSWORD', 'password_here');
Change the values for database_name_here, username_here and password_here to what you created earlier in the database and save the changes.
Open browser and go to http://localhost/wp-admin/install.php to start the configuration process. A configuration page will appear, fill in the Site title, set your admin password and email address and click Install WordPress.
Login as the admin user and start customizing your site and start developing!
Hi Mark,
I am a close friend of Jeff Spray. and am interested in getting wordpress up and running on a Linux box. Curious if the instructions above would still hold true for Fedora 20?
BTW Jeff says hi.
On the phone with him now…
Jim, The instructions still apply for Fedora 20, I just had lunch with Jeff today.