Complete Guide: Setting up Apache, MySQL, PHP, and WordPress on Linux (LAMP)

preview_player
Показать описание

0:00 Let's get started
0:35 Apache installation
1:08 Mysql installation
1:24 PHP installation
2:03 MySQL Setup
6:06 Wordpress download
7:75 Wordpress installation

In this comprehensive tutorial, learn how to effortlessly set up Apache, MySQL, and PHP on your Linux computer. Follow along as we guide you through each step, from installing the necessary components to configuring them for optimal performance. Furthermore, we'll demonstrate the seamless installation of WordPress, allowing you to create and manage your own dynamic websites with ease. Whether you're a beginner or an experienced user, this video will equip you with the knowledge to kickstart your web development journey.

Commands (In Order:)

Install Apache: sudo apt install apache2
Install MySQL: sudo apt install mysql-server
Install PHP: sudo apt install php libapache2-mod-php php-mysql php-xml php-curl

Setup MySQL:
sudo mysql_secure_installation

If you get a FAILED error, use the following:
sudo mysql -u root
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Password123!';
FLUSH PRIVILEGES;
EXIT;

Create the database: CREATE DATABASE wordpress;
Create the user: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Password123!';
Add user to database: GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress_admin'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;

Navigate to html folder: cd /var/www/html

Downloading WordPress:
Remove apache index file: sudo rm *

Open WordPress folder: cd wordpress
Go back to the html folder: cd ..
Move the files from the wordpress folder to the html folder: sudo mv wordpress/* .

UPDATED COMMANDS:
Give permission to the html folder: sudo chown www-data:www-data -R /var/www/html
One last command: sudo chmod -R 755 /var/www/html
Рекомендации по теме
Комментарии
Автор

Im setting up a similar site and it tells me when i try to install that "process controll extension" isnt installed. But i checked and the php modul "pcntl" is installed and enabled. Can you help me? Im stuck.

freimutspitzkopf