Membangun jaringan website dalam satu instalasi WordPress kini semakin populer, terutama bagi developer maupun pemilik bisnis digital yang ingin mengelola banyak situs secara efisien.
Dengan konsep multisite, kamu dapat mengatur berbagai website hanya dari satu dashboard tanpa perlu instalasi berulang. Kombinasi dengan stack LNMP (Linux, Nginx, MySQL, PHP) juga memberikan performa tinggi dan lebih ringan dibandingkan konfigurasi tradisional.
Di sisi lain, penggunaan subdomain dalam WordPress Multisite menjadi solusi fleksibel untuk membuat situs turunan seperti site1.domain, site2.domain, dan seterusnya.
Artikel ini akan membahas secara lengkap dan praktis cara setting WordPress Multisite menggunakan stack LNMP dengan subdomain, mulai dari persiapan hingga konfigurasi akhir.

Install dan Configure Stack LNMP
Update dan Upgrade package ubuntu 24.04.
sudo apt update && sudo apt upgrade
Install NGINX, MariaDB, dan PHP.
sudo apt install nginx mariadb-server mariadb-common php8.3 php8.3-fpm php8.3-bcmath php8.3-xml php8.3-mysql php8.3-zip php8.3-intl php8.3-ldap php8.3-gd php8.3-cli php8.3-bz2 php8.3-curl php8.3-mbstring php8.3-imagick php8.3-tokenizer php8.3-opcache php8.3-memcache php8.3-cgi -y
Buat konfigurasi nginx untuk WordPress Multisite.
sudo nano /etc/nginx/sites-available/DOMAIN.conf
Masukan script configuration nginx dibawah.
server {
listen 80;
server_name DOMAIN www.DOMAIN;
root /var/www/DOMAIN;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
fastcgi_index index.php;
fastcgi_param DOCUMENT_ROOT $realpath_root;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
}
access_log /var/log/nginx/DOMAIN_access.log;
error_log /var/log/nginx/DOMAIN_error.log;
}
Cek configuration, jika muncul error cek kembali configuration nginx.
sudo nginx -t
Buat symbolic link untuk configuration nginx.
sudo ln -s /etc/nginx/sites-available/DOMAIN.conf /etc/nginx/sites-enabled/
Aktifkan dan restart service nginx.
sudo systemctl enable nginx sudo systemctl restart nginx
Hapus configuration default dari nginx.
sudo rm /etc/nginx/sites-available/default sudo rm /etc/nginx/sites-enabled/default sudo rm -r /var/www/html
Catatan: Lab ini menggunakan DNS Record Cloudflare, tanpa mengaktifkan fitur proxy pada dns record.
Install certbot let’s encrypt untuk mengaktifkan TLS/SSL.
sudo snap install --classic certbot sudo ln -s /snap/bin/certbot /usr/local/bin/certbot
Jalankan perintah certbot untuk generate TLS/SSL Let’s Encrypt.
sudo certbot --nginx
Download WordPress, ekstrak, dan pindahkan ke /var/www/DOMAIN .
wget https://wordpress.org/latest.tar.gz -O wordpress.tar.gz tar xzvf wordpress.tar.gz sudo mv wordpress/* /var/www/DOMAIN
Ubah ownership dan permission file WordPress.
chown -R www-data:www-data /var/www/DOMAIN
chmod -R 755 /var/www/DOMAIN
sudo find /var/www/DOMAIN -type d -exec chmod 775 {} \;
sudo find /var/www/DOMAIN -type f -exec chmod 664 {} \;
Create database WordPress Main Site.
sudo mariadb -u root -p CREATE DATABASE NAMA_DATABASE;
Membuat user database dan menghubungkan ke database.
CREATE USER 'USERNAME'@'localhost' IDENTIFIED BY 'PASSWORD'; GRANT ALL PRIVILEGES ON NAMA_DATABASE.* TO 'USERNAME'@'localhost'; FLUSH PRIVILEGES; EXIT;
Akses https://DOMAIN pada browser untuk melakukan instalasi.
Configuration WordPress Multisite
Buka file configuration server block Nginx, ubah dari www.domain menjadi *.domain.com.
sudo nano /etc/nginx/sites-available/DOMAIN.conf
server {
server_name DOMAIN *.DOMAIN;
root /var/www/geekslabs.net;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
fastcgi_index index.php;
fastcgi_param DOCUMENT_ROOT $realpath_root;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
}
access_log /var/log/nginx/geekslabs.ne_access.log;
error_log /var/log/nginx/geekslabs.ne_error.log;
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/geekslabs.net/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/geekslabs.net/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = *.DOMAIN) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = geekslabs.net) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name DOMAIN *.DOMAIN;
return 404; # managed by Certbot
}
DNS Record Clouflare untuk subdomain multisite, tambahkan record untuk * (wildcard subdomain apapun).

- Type: A, Name: *, Content: IP Public Server
- Type: A, Name: DOMAIN, Content: IP Public Server
Setting Multisite
Buka file config WordPress.
sudo nano /var/www/DOMAIN/wp-config.php
Tambahkan script configuration multisite, pasang di atas baris /* That’s all, stop editing! Happy publishing. */
define('WP_ALLOW_MULTISITE', true);
- Login ke dashboard WordPress. Buka menu Tools -> Network Setup.
- Addresses of Sites in your Network pilih Sub-domains.
- Klik Install.
Buka kembali file wp-config.php WordPress.
sudo nano /var/www/DOMAIN/wp-config.php
Tambahkan configuration script multisite diatas /* That’s all, stop editing! Happy publishing. */.
define( 'MULTISITE', true ); define( 'SUBDOMAIN_INSTALL', true ); define( 'DOMAIN_CURRENT_SITE', 'DOMAIN' ); define( 'PATH_CURRENT_SITE', '/' ); define( 'SITE_ID_CURRENT_SITE', 1 ); define( 'BLOG_ID_CURRENT_SITE', 1 );
Setelah selesai logout dari dashboard WordPress dan Login kembali.
Menambahkan WordPress Baru
Menampilkan daftar semua WordPress, klik menu My Sites -> Network Admin -> Sites. Secara default hanya akan muncul main WordPress.
- Untuk menambah WordPress, klik My Sites -> Network Admin -> Sites -> Add New.
- Site Address (URL): subdomain website, misal ‘geeks2‘
- Site Title: judul website, misal ‘WordPress geeks2‘
- Admin Email: alamat email untuk admin website, masukan gmail atau punya email custom dari domain.
- Klik Add Site
Untuk melakukan penambahan WordPress baru misalnya subdomain ‘geeks2’ lakukan dari no.1 ke 5.
TLS/SSL Let’s Encrypt Wildcard
Certbot memiliki fitur –expand dimana kamu bisa memperbarui SSL dan memasukkan subdomain yang baru, sehingga cukup menggunakan satu sertifikat SSL saja.
Tunggu sampai proses generate selesai.
sudo certbot --expand -d domain,sub1.domain,sub2.domain,dst
Output generate TLS/SSL Wildcard, berjumlah 5 subdomain + 1 domain.
Saving debug log to /var/log/letsencrypt/letsencrypt.log Requesting a certificate for DOMAIN and 5 more Successfully received certificate. Certificate is saved at: /etc/letsencrypt/live/DOMAIN-0001/fullchain.pem Key is saved at: /etc/letsencrypt/live/DOMAIN-0001/privkey.pem This certificate expires on 2026-07-30. These files will be updated when the certificate renews. Certbot has set up a scheduled task to automatically renew this certificate in the background. Deploying certificate Successfully deployed certificate for DOMAIN to /etc/nginx/sites-enabled/DOMAIN.conf Successfully deployed certificate for geeks2.DOMAIN to /etc/nginx/sites-enabled/DOMAIN.conf Successfully deployed certificate for geeks3.DOMAIN to /etc/nginx/sites-enabled/DOMAIN.conf Successfully deployed certificate for geeks4.DOMAIN to /etc/nginx/sites-enabled/DOMAIN.conf Successfully deployed certificate for geeks5.DOMAIN to /etc/nginx/sites-enabled/DOMAIN.conf Successfully deployed certificate for geeks6.DOMAIN to /etc/nginx/sites-enabled/DOMAIN.conf Congratulations! You have successfully enabled HTTPS on https://DOMAIN, https://geeks2.DOMAIN, https://geeks3.DOMAIN, https://geeks4.DOMAIN, https://geeks5.DOMAIN, and https://geeks6.DOMAIN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - If you like Certbot, please consider supporting our work by: * Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate * Donating to EFF: https://eff.org/donate-le - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Hasil membuat WordPress multisite.

Kesimpulan
Menggunakan WordPress Multisite dengan stack LNMP dan subdomain adalah solusi yang sangat efisien untuk mengelola banyak website dalam satu sistem terpusat.
Dengan konfigurasi yang tepat, kamu bisa mendapatkan performa tinggi sekaligus kemudahan manajemen yang lebih baik.
Dengan mengikuti langkah-langkah di atas, kamu tidak hanya berhasil mengaktifkan multisite, tetapi juga mengoptimalkannya untuk kebutuhan skala besar.
Pastikan setiap konfigurasi dilakukan dengan teliti, terutama pada bagian DNS dan Nginx, karena keduanya sangat berpengaruh terhadap keberhasilan sistem multisite.

