Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- install wordpress + lamp + (php 8.0) on VPS | ubuntu 20.04
- 1. login ssh
- 2. change repo ubuntu (optional)
- 3. instal apache2, mariadb-server, software-properties-common
- 4. add repo : add-apt-repository ppa:ondrej/php
- 5. install php dan modul tambahan php :
- apt install php8.0 php8.0-curl php8.0-gd php8.0-mbstring php8.0-xml php8.0-xmlrpc php8.0-soap php8.0-intl php8.0-zip
- apt install curl php8.0-mysql
- 6. restart service apache, dan cek smua service sudah berjalan
- 7. login mysql, create database wordpress : CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
- 8. add new user : CREATE USER 'wordpressuser'@localhost IDENTIFIED BY 'password1';
- 9. grant all user : GRANT ALL ON wordpress.* TO 'wordpressuser'@localhost;
- 10. flush privileges : FLUSH PRIVILEGES;
- 11. *for ipv6 vps, you must install warp : wget -N https://cdn.jsdelivr.net/gh/fscarmen/warp/menu.sh && bash menu.sh
- 12. install wordpress :
- cd /tmp
- curl -O https://wordpress.org/latest.tar.gz
- tar xzvf latest.tar.gz
- touch /tmp/wordpress/.htaccess
- cp /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php
- mkdir /tmp/wordpress/wp-content/upgrade
- cp -a /tmp/wordpress/. /var/www/html/wordpress
- chown -R www-data:www-data /var/www/wordpress
- find /var/www/html/wordpress/ -type d -exec chmod 750 {} \;
- find /var/www/html/wordpress/ -type f -exec chmod 640 {} \;
- curl -s https://api.wordpress.org/secret-key/1.1/salt/
- copy all secret key
- nano /var/www/html/wordpress/wp-config.php
- paste secret key, then change database, user, password,db_prefix, etc
- nano /etc/apache2/sites-available/wordpress.conf
- <VirtualHost *:80>
- ServerName example.com
- ServerAlias www.example.com
- ServerAdmin admin@example.com
- DocumentRoot /var/www/html/wordpress
- <Directory /var/www/wordpress/>
- Options FollowSymlinks
- AllowOverride All
- Require all granted
- </Directory>
- ErrorLog ${APACHE_LOG_DIR}/error.log
- CustomLog ${APACHE_LOG_DIR}/access.log combined
- </VirtualHost>
- a2enmod rewrite
- a2ensite wordpress.conf
- systemctl restart apache2
- access your domain or ip : https://server_domain_or_IP
- repo ubuntu 20.04
- deb http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
- deb http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
- deb http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
- deb http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
- deb http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu/ focal-proposed main restricted universe multiverse
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement