To install WordPress on Kali Linux, you can use the following steps:
- Install the LAMP (Linux, Apache, MySQL, and PHP) stack by running the following command:
sudo apt-get install apache2 mysql-server php7.0 libapache2-mod-php7.0 php7.0-mysql
- Start the Apache and MySQL services using the following commands:
sudo systemctl start apache2
sudo systemctl start mysql
- Create a new MySQL database and user for WordPress:
mysql -u root -p
CREATE DATABASE wordpress;
CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wp_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
- Download the latest version of WordPress from the official website: https://wordpress.org/download/
- Extract the downloaded file and move it to the Apache document root directory:
/var/www/html/
- Change the ownership and permissions of the WordPress directory:
sudo chown -R www-data:www-data /var/www/html/wordpress
sudo chmod -R 755 /var/www/html/wordpress
- Run the WordPress installation script by accessing
http://localhost/wordpress/
in your web browser. - Follow the prompts to complete the installation, including providing the database information you created earlier.
You should now be able to access your WordPress site by going to http://localhost/wordpress/
in your web browser.