Before sharing this information and knowledge, I would like to remind very important disclaimer. I will not be responsible for any of your action and disclaim all the liabilities in respect to this bit of writing which is just for learning purposes.
How to Create a WordPres Powered website on Local Machine
For learning purpose we will work only on Virtual machines, so first get the Virtual plat form as I have got VMware Workstation, you can select Virtual Box from Oracle as well. Download one of them and install on your machine.
We are creating a two virtual machine, one will act as a Server for hosting all the required file and will act as a Victim machine, while the other one will be backtrack. Both are Linux base, don’t worry if you don’t know how to use Linux, for this tutorial i will cover all the basic things which required to do penetration test.
Meanwhile you can attack on any website site which is using WordPress as CMS: Like other Content management systems on the web, WordPress is keep updating files to make it more secure. Security should always be a major concern when using the WordPress as CSM.
After installing the VMware Workstation or VirtualBox, get the CentOS and Backtrack, other than CentOS you can use other Lunix flavours like Ubuntu. After installing the OS on your Virtual box now ready for to install the back end for WordPress powered site.
To set up a WordPress powered website we need Appche server, MySQL, PHP, to install the MySQL on Server machine have done the following command on Terminal:
Go to Application > Accessories and click on Terminal, it will open the terminal box:
Under terminal type the following command to install the mysql on the server.
# yum install mysql mysql-server
After installation start the server as:
# service mysqld start
phpmyadmin is the best way to mange the mysql database, so installed it on local server and created database and data users, and install it by running this command:
# yum install phpmyadmin
Now install the apache server by running this command in terminal:
# yum install httpd
After installation run the service:
# service httpd start
Open the browser and open the link http://localhost/phpmyadmin and create the database, it will ask you to provide root user name and password:
Enter the password when prompted and created the database through phpmyadmin.
Database created now got the WordPress as follow:
Create a new folder and Download the WordPress software in a folder /var/www/html/wordpress/ and unzip it.
# mkdir /var/www/html/wordpress
go to the creatd folder by this command:
# cd /var/www/html/wordpress/
and run the following command to download the WorPress here and unzip it:
# tar -xzvf latest.tar.gz
In a web browser open the localhost to install the WordPress on created folder:
Prompted and requested to provide the database name and password, user admin’s name and password for admin:
This process should created the wp-config file contain all the database information but it gave an error thst unable to create the wp-config.php file so run following command to change the folder ownership:
# chown apache:apache /var/www/html/wordpress –R
or manually copy and past the code and create the wp-config.php file.
As well it offers to manually create the wp-config file so created the one and it created the installed CMS login to the admin panel. We have installed WordPress in beds folder and in a browser enter the IP address or with localhost as follow localhost/beds/wp-admin to enter into main admin area and site is running on a local server.