Setup Steps
1. Install LAMP components:
sudo apt install apache2 mysql-server php php-mysql php-xml php-mbstring php-curl php-gd php-zip libapache2-mod-php -y2. Create MySQL database:
sudo mysql -u root -p
CREATE DATABASE wordpress;
CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'StrongPass123!';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;3. Download WordPress:
cd /tmp
wget https://wordpress.org/latest.tar.gz
tar xzf latest.tar.gz
sudo mv wordpress /var/www/html/mysite4. Set file permissions:
sudo chown -R www-data:www-data /var/www/html/mysite
sudo chmod -R 755 /var/www/html/mysite5. Create wp-config.php:
cd /var/www/html/mysite
sudo cp wp-config-sample.php wp-config.php6. Edit database credentials and set security keys
7. Navigate to http://server_ip/mysite in your browser
8. Complete the WordPress setup wizard
Related Guides
Linux VPS Server Setup (Ubuntu)
Configure your Ubuntu-based VPS server from scratch. Security, user management and basic settings.
Apache Web Server Setup
Install Apache HTTP server and configure virtual hosts.
Nginx Web Server Setup
Install Nginx web server and configure it as a reverse proxy.
Let's Encrypt SSL Certificate Setup
Get a free SSL/TLS certificate with Certbot and enable HTTPS.