Since most WordPress hosting servers are LAMP-compatible (Linux, Apache, MySQL, and PHP), I’m writing this 3-minutes WordPress setup guide for Red Hat Linux (my another 3-minutes setup guide attempt).
How to setup or install latest WordPress locally in 3 minutes on Red Hat Linux LAMP?
A LAMP-compatible machine to run the WordPress is powered by any one of the Linux distributions (in this case, it’s Red Hat Enterprise Linux 4), Apache web server, MySQL database version 4.0 or latest and PHP version 4.2 or latest. For simplicity, these following steps are all done in Linux command line with root user ID!
Edit the /etc/hosts file to append a mnemonic name for the Red Hat IP address, e.g:
127.0.0.1 localhost www.walkernews-test.net
Make sure the MySQL database server and Apache web server are both running. If you’re not sure, just type these commands to restart them:
service mysqld restart
service httpd restart
Download the latest WordPress installation file to the Red Hat Linux LAMP (R-LAMP) machine.
Type mysql (MySQL client or database manager) to connect to the MySQL database server (automatically login with MySQL database admin user privileges under Linux root user ID).
At the MySQL client prompt (“mysql>”), create and configure a testing database for WordPress to store blog posts, login users, etc:
Replace the database name “wtest”, admin user “wtestadmin” and password “wtestadmin-password” with your favour.
CREATE DATABASE wtest; GRANT ALL PRIVILEGES ON wtest.* TO wtestadmin@localhost IDENTIFIED BY "wtestadmin-password"; FLUSH PRIVILEGES; exit
Type show databases; to list all existing databases created in MySQL server. By default, MySQL installation creates two databases named as “mysql” and “test”. So, try NOT to name the testing database for WordPress as “test” or “mysql” or any database name that are already in use!
Create WordPress installation directory and Extract the WordPress installation file downloaded in step 3 to the installation directory:
tar -zxvpf wordpress*.tar.gz (.tar.gz format)
unzip wordpress*.zip (.zip format)
mv wordpress/* /var/www/html/wtest
You can also NOT to create WordPress installation directory and extract all the WordPress installation files in /var/www/html directory, which will make the testing WordPress blog URL seen as “http://www.walkernews-test.net” in web browser (otherwise, it’s http://www.walkernew-tests.net/wtest)!
Edit and configure the WordPress configuration file, i.e. wp-config.php:
define('DB_NAME', 'wtest'); define('DB_USER', 'wtestadmin'); define('DB_PASSWORD', 'wtestadmin-password'); define('DB_HOST', 'localhost'); define('DB_CHARSET', 'utf8'); define('DB_COLLATE', '');
If you run this step from another machine, you need to edit the /etc/hosts file on that machine accordingly (see step 1), e.g.:
On Windows machine, such as Windows Vista, the Linux /etc/hosts file equivalent is called
Since this is just a local WordPress installation for testing purpose, remember to untick the check-box “I would like my blog to appear in search engine like Google and Technorati” in step 1!
Once the WordPress installation completed successfully, there is a default WordPress administration user ID called “admin” and its auto-generated random password. Remember to copy the password carefully in order to login and change the default password later!
If you prefers to Windows-LAMP (WAMP) or other Linux distributions (which the steps are mostly the same), refer to the references of “Install WordPress Locally” at WordPress site.