Installing XAMPP on ubuntu

sudo chmod +x
  • Now run the file using below command
sudo ./

Xampp will be installed at below location


Starts xampp control panel using below command :

sudo /opt/lampp/

Starts all the servers and test the below urls to check if everything is installed correctly :


htdocs location :


Uninstall Xamp/Lamp

sudo /opt/lampp/uninstall
sudo rm -r /opt/lampp

Installing wordpress of XAMPP

Download the latest wordpress files using below command

wget -c

Unzip it and copy into htdocs directory

tar -xzvf latest.tar.gz
sudo rsync -av wordpress/* /opt/lampp/htdocs/

Identify the username/user of the webserver we need to run the below command

ps aux | grep httpd

Change the owner of the wordpress directory and give it permissions as below

sudo chown -R daemon /opt/lampp/htdocs/wordpress/
sudo chown daemon /opt/lampp/htdocs/
sudo chmod -R 755 wordpress/

Setup the XAMPP secuirty using below command, setup the root password

Navigate to below URL and create a db named wordpress


Now we need to create a copy of wp-config.php file and edit the database details in it

sudo cp /opt/lampp/htdocs/wordpress/wp-config-sample.php /opt/lampp/htdocs/wordpress/wp-config.php
sudo vi /opt/lampp/htdocs/wordpress/wp-config.php
	define( 'DB_NAME', 'wordpress' );
	define( 'DB_USER', 'root' );
	define( 'DB_PASSWORD', '' );
	define( 'DB_HOST', 'localhost' );

Now you can restart the webserver once and navigate to below URL to start configuring the wordpress :


Leave a Comment