How to Install Wordpress on Localhost Linux Backtrack 5

Wordpress is a wonderful and user friendly CMS (content management system), there are so many blogs now a days are using wordpress software for their blogging. Although there are different other CMS software's are available but wordpress has its own importance due to its amazing features, well this article is not about to discuss advantages of wordpress over other CMS like Joomla but the main aim of this article is to demonstrate. How to install wordpress on your Linux machine whether localhost or remote (web server).

You can install wordpress on your local computer but why to install wordpress on locahost ? Answer is very simple penetration testing / Ethical hacking requires practice so install wordpress on your computer to practice wordpress hacking. After installation you can test different wordpress vulnerability scanner software's and you can use different plug ins too.

The method to install wordpress on windows is different from Linux but easy, all you need to do is to download a xampp setup because it contain the apache and sql software's but in backtrack 5 R1 (based on ubuntu) we have apache and sql software by default. So follow this to install wordpress on your Linux machine.

  • Download the wordpress software
  • Extract it on www folder (goto the file system then var and then www) it is good to make a separate folder for wordpress.
  • Now start apache and sql (Applications → Backtrack → Services → HTTPD → MYSQLD)
  • There is a need to create a database for wordpress, open terminal and type:


root@bt:~# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 104
Server version: 5.1.41-3ubuntu12.10 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE DATABASE name;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL PRIVILAGES ON name.* TO "username"@"localhost"
-> IDENTIFIED BY "passwordhere";
Query OK, 0 row affected (0.00 sec)

mysql> FLUSH PRIVILAGES;
Query OK, 0 row affected (0.00 sec)

mysql> EXIT
Bye
root@bt:~#

  • Now on your browser locate the localhost in my case http://127.0.0.1/wordpress
  • Now on the database setting panel

Database Name: wordpress (or any database )
User Name: username (entered on Mysql setup)
Password: passwordhere
Database Host: localhost
Table Prefix: wp_

  • On the next window copy this config code and create a new file paste it then save it to the same directory with the name wp-config.php
  • Then click on install
  • Reopen the browser and create an admin account.
  • Thats it.

You can open your new wordpress http://127.0.0.1/wordpress


Note: If you want to learn more about Linux and Windows based Penetration testing, you might want to subscribe our RSS feed and Email Subscription  or become our Facebook fan! You will get all the latest updates at both the places.