Install WordPress in your VPS manualmente
Stack LEMP (Linux + Nginx + MySQL + PHP)
Esta guide instala WordPress en un VPS with Ubunyour 22.04 using el stack LEMP, la combinación más rápida for WordPress.
Step 1 — Install Nginx, MySQL and PHP
apt update && apt upgrade -y
apt install nginx mysql-server php8.2-fpm php8.2-mysql php8.2-xml php8.2-curl php8.2-mbstring php8.2-zip php8.2-gd -y
systemctl start nginx mysql php8.2-fpm
systemctl enable nginx mysql php8.2-fpm
apt install nginx mysql-server php8.2-fpm php8.2-mysql php8.2-xml php8.2-curl php8.2-mbstring php8.2-zip php8.2-gd -y
systemctl start nginx mysql php8.2-fpm
systemctl enable nginx mysql php8.2-fpm
Step 2 — Create database MySQL
mysql -u root -p
CREATE DATABASE wordpress;
CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'TuPasswordSafe';
GRANT ALL ON wordpress.* TO 'wpuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
CREATE DATABASE wordpress;
CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'TuPasswordSafe';
GRANT ALL ON wordpress.* TO 'wpuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Step 3 — Download e install WordPress
cd /var/www
wget https://wordpress.org/latest.tar.gz
tar -xzf latest.tar.gz
mv wordpress tudomain
chown -R www-data:www-data tudomain
chmod -R 755 tudomain
wget https://wordpress.org/latest.tar.gz
tar -xzf latest.tar.gz
mv wordpress tudomain
chown -R www-data:www-data tudomain
chmod -R 755 tudomain
Step 4 — Configure Nginx for WordPress
Crea el file /etc/nginx/conf.d/tudomain.conf:
server {
listen 80;
server_name tudomain.com;
root /var/www/tudomain;
index index.php;
location / { try_files $uri $uri/ /index.php?$args; }
location ~ \.php$ {
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
listen 80;
server_name tudomain.com;
root /var/www/tudomain;
index index.php;
location / { try_files $uri $uri/ /index.php?$args; }
location ~ \.php$ {
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Luego: nginx -t && systemctl reload nginx
Step 5 — Completer instalación from el navegador
Ve a http://tudomain.com and sigue el asistente de instalación de WordPress with los data of the database of the Step 2.
✅ WordPress instalado. Log in tol panel en
tudomain.com/wp-admin. For agregar HTTPS, instala Certbot: apt install certbot python3-certbot-nginx -y && certbot --nginx -d tudomain.com