# Installing Wordpress in LAMP (Debian) > This is more like a personal note but if it's helpful to you go ahead! ## Installing everything you need Get all the pre requisites of wordrpess ```sh $ apt install apache2 php7.3 libapache2-mod-php7.3 php7.3-common php7.3-mbstring php7.3-xmlrpc php7.3-soap php7.3-gd php7.3-xml php7.3-intl php7.3-mysql php7.3-cli php7.3-ldap php7.3-zip php7.3-curl ``` That'll do Check php and apache is working: ```sh $ vim /var/www/html/test.php ``` Go to your server url /test.php and verify that you can see the php info. ## Installing MySQL Install MySQL ```sh $ apt install default-mysql-server ``` And configure it ```sh $ apt mysql_secure_installation ``` Enter MySQL ```sh $ apt mysql ``` Create the database and a user to handle it ```sh $ CREATE DATABASE wordpress; $ GRANT ALL PRIVILEGES on wordpress.* TO 'wordpress_user'@'localhost' IDENTIFIED BY 'wordpress_pss123'; $ FLUSH PRIVILEGES; $ EXIT; ``` ## Installing Wordpress We need wget, so let's install it ```sh $ apt install wget ``` Move to the tmp folder to download the tar file ```sh $ cd /tmp/ $ wget -c https://wordpress.org/latest.tar.gz ``` Decompress it and then move it straight to the public html folder ```sh $ tar -xvzf latest.tar.gz $ mv wordpress/* /var/www/html/ $ chown -R www-data:www-data /var/www/html/ $ chmod 755 -R /var/www/html/ ``` Let's create the virtualhost for Wordpress ```sh $ vim /etc/apache2/sites-available/wordpress.conf ``` This is a very standard configuration: ```sh DocumentRoot /var/www/html ServerName your-domain.com Options FollowSymlinks AllowOverride All Require all granted ErrorLog ${APACHE_LOG_DIR}/domain.com_error.log CustomLog ${APACHE_LOG_DIR}/domain.com_access.log combined ``` Enable the virtualhost and the apache rewrite module ```sh $ ln -s /etc/apache2/sites-available/wordpress.conf /etc/apache2/sites-enabled/wordpress.conf $ a2enmod rewrite $ service apache2 restart ``` You are almost done, now you need just to remove the index.html which contains the apache welcome file. I don't think this step is absolutely necessary but I had some trouble because of it. ```sh $ rm /var/www/html/index.html $ service apache2 restart ``` That's it, you should be able to see a fresh-installed wordpress at your domain