Debian 10 සංස්කරණයෙන් vps(Virtual private server) එකක් ගන්න
Virtual private server මිලදී ගන්න පුලුවන් හොද වෙබ් අඩවි පහලින් දිල තියනවා
දැන් server එකට LAMP Stack install කරගන්න පහලින් තියන commands ටික ssh client එකෙන් server එකට ලොගින් වෙලා terminal එකේ paste කරන්න (terminal එකේ paste කරද්දි mouse right click එකෙන් තමා paste කරන්නේ )
Apache install කරගන්න පහලින් තියන command එකෙන්
apt install apache2
Do you want to continue? [Y/n] කියන තැනට Y ගහලා Enter දෙන්න (මෙහෙම එකක් අවොත් විතරක් හොදේ වැඩිය හිතන්න යන්න එපා :/)

Apache වැඩ කරනවද කියල බලන්න පහලින් තියන command එකෙන්
systemctl status apache2

q ඔබන්න Active: active (running) කියල තියනව නම්
server එකෙ firewall එකක් run වෙනවනම් පහලින් තියන command ටික ගහන්න (firewall එකක් වැඩ කරනවනම් විතරයි command ටික වැඩ කරන්නේ)
ufw allow www ufw allow https ufw status
server ip එක url bar එකේ ගහල බලන්න

domain දාගන්න ඔන්නම් domain එකක් සල්ලි වලට ගන්න අරගෙන a record දාන්න
මෙක බලන්න domain එකක් දාගන්න පුලුවන් free 1 year 🙂
MariaDB install කරගන්න පහලින් තියන commands ටික ගහන්න 🙂
apt install mariadb-server
Do you want to continue? [Y/n] කියන තැනට Y ගහලා Enter දෙන්න

security script එකක් තියනව එකත් install කරගන්න පහල තියන command එක ගහලා
mysql_secure_installation

අංක එක : root password එක ගහලා enter දෙන්න
අංක දෙක : root password එක වෙනස් කරගන්න ඔන්නම් y දෙන්න නැත්නම් n දෙන්න
අංක තුන : y දෙන්න
අංක හතර : y දෙන්න
අංක පහ : y
අංක හය : y

දැන් database එකක් හදාගන්න ඔනේ
mysql -u root -p
password එකට root password එක දෙන්න
CREATE DATABASE bocca_wpdb; GRANT ALL ON bocca_wpdb.* TO 'bocca_wpuser'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION; FLUSH PRIVILEGES; exit;
bocca කියල තියන තැනට ඔයා කැමති නමක් දෙන්න ‘password’ කියන තැනට ඔයාගේ password එකක් දෙන්න
දැන් PHP 7.3 install කරන්න යන්නේ 🙂
apt install php libapache2-mod-php php-mysql
Do you want to continue? [Y/n] කියන තැනට Y ගහලා Enter දෙන්න

apt-cache search php | egrep 'module' | grep default

systemctl reload apache2 systemctl status apache2
q ඔබන්න

දැන් test කරල බලමු php අයියව 🙂
nano /var/www/html/info.php

<?php phpinfo(); ?>

CTRL+X
Y
ENTER
url bar එකේ server ip එක ගහලා /info.php දෙන්න (http://xxx.xxx.xx.xxx/info.php)
SERVER_IP/info.php

ඔහොම page එකක් load වෙනවනම් වැඩේ ගොඩ….
මෙකත් ගහන්න
rm /var/www/html/info.php
ඔය උඩ තියන comamnd එකෙන් වෙන්නේ info.php file එක remove වෙන එක 🙂
PHP Extensions ටිකක් තියනවා එකත් install කරමු 🙂
sudo apt update
sudo apt install php php-mysql php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip
Do you want to continue? [Y/n] කියන තැනට Y ගහලා Enter දෙන්න

apache restart පාරක් දාන්න
sudo systemctl restart apache2
Install WordPress
ඔන්න දැන් තමා හොදම හරිය 🙂
cd /var/www/html/
sudo curl -O https://wordpress.org/latest.tar.gz
sudo tar -xvf latest.tar.gz
sudo rm latest.tar.gz
sudo chown -R www-data:www-data /var/www/html/wordpress
sudo find /var/www/html/wordpress/ -type d -exec chmod 750 {} \; sudo find /var/www/html/wordpress/ -type f -exec chmod 640 {} \;
cd wordpress
sudo mv wp-config-sample.php wp-config.php
sudo nano wp-config.php

DB_NAME එකට හදාගත්ත data base name එක දෙන්න
DB_USER එකට data base username එක දෙන්න
DB_PASSWORD data base එකට දාගත්ත password එක දෙන්න

දැන් CTRL+X ඔබන්න Y ඔබලා Enter දෙන්න
sudo curl -s https://api.wordpress.org/secret-key/1.1/salt/

දැන් ඔය උඩින් හැදිලා තියන key ටික ඔක්කොම copy කරගන්න highlight කරලා right click කරන්න mouse එකේ

sudo nano wp-config.php

දැන් උඩින් තියන command එකත් ගහන්න ගහලා ටිකක් යටට යද්දි තියනවා බලගන්න පුලුවන් උඩින් තියන screenshot එකේ වගේ
අපි save කරගත්ත key ටික ගහන්න note pad එකෙන් copy කරලා right click කරලා paste කරන්න

save කරගන්න CTRL+X ඔබන්න Y ඔබලා Enter දෙන්න
sudo nano /etc/apache2/sites-available/000-default.conf

පහලින් දිලා තියන code එක add කරගන්න 000-default.conf එකට
<Directory /var/www/html/wordpress/> AllowOverride All </Directory>

save කරගන්න CTRL+X ඔබන්න Y ඔබලා Enter දෙන්න
WordPress Permalink feature use කරන්න මෙකත් ගහන්න
sudo a2enmod rewrite

sudo apache2ctl configtest
sudo systemctl restart apache2
දැන් අපේ wordpress site එක install වෙලා තියෙන්නේ දැන් server ip එක url bar එකේ ගහලා wordpress එක setup කරගන්න




wordpress install කරද්දී මොකක් හරි අවුල් තැනක් තියනවනම් කියන්න comment එකක් දාල
තවත් අලුත් ලිපියකින් හමුවෙමු.
https wada karane na ne eka hadagane kohmda
මම තව ලිපියක් දාන්නම් ssl දාන විදිහ ගැන
free host karagana vidihak nadda
https://www.000webhost.com/free-wordpress-hosting
godak watinwa machan uba me karana wade digatama karagena yanna
https link ekata yaddi site eka pennane na eka hadagane kohomda
Cloudflare දාන්න නැත්තං Let’s Encrypt ssl එකක් දාගන්න
cloudflare eka dagane kohomada ??
ඔයාට හදිස්සි නම් google කරලා බලන්න මම හරියට වැඩේ කරගන්න විදිහ ගැන ලිපියක් දාන්නම්.