WordPress Deployment

Update the System

sudo apt update
sudo apt upgrade

Install Web Server

  • Install Apache and set it to start automatically.
sudo apt install apache2
sudo systemctl start apache2
sudo systemctl enable apache2
  • Check installation status:
sudo systemctl status apache2
  • Access <http://your_vps_ip> to see if you have the Apache2 Ubuntu Default Page.

Install MySQL

sudo apt install mysql-server
  • Configure MySQL:
    • Set a password for the MySQL root user (choose password conditions).
    • Remove anonymous users.
    • Disallow remote root login.
    • Remove the test database.
    • Reload the privilege table.

Install PHP

  • Install PHP and Necessary PHP Modules
sudo apt install php libapache2-mod-php php-mysql
  • Configure Apache:
sudo systemctl restart apache2
  • Create a PHP test file:
sudo nano /var/www/html/info.php
  • Type in the editor
<?php phpinfo(); ?>
  • Save and exit (press Ctrl + X, then Y, then Enter).
  • Check if the PHP page is displayed
    • Visit <http://your_vps_ip/info.php>

Install WordPress

  • Download WordPress:
cd /var/www/html
sudo wget https://wordpress.org/latest.tar.gz
  • Extract WordPress:
sudo tar xzvf latest.tar.gz
  • Set WordPress permissions:
sudo chown -R www-data:www-data /var/www/html/wordpress
  • Create the WordPress configuration file:
sudo cp /var/www/html/wordpress/wp-config-sample.php /var/www/html/wordpress/wp-config.php
  • Set up the database: (Change the PASSWORD)
sudo mysql -u root -p
CREATE DATABASE wordpress;
CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpressuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
  • Configure WordPress:
sudo nano /var/www/html/wordpress/wp-config.php
define('DB_NAME', 'wordpress');
define('DB_USER', 'wordpressuser');
define('DB_PASSWORD', 'PASSWORD');
define('DB_HOST', 'localhost');
  • Complete the installation:
    • Visit http://your_vps_ip/wordpress

(Optional) Install phpMyAdmin

phpMyAdmin is a convenient web interface tool for managing MySQL databases.

  • Install phpMyAdmin:
sudo apt install phpmyadmin
  • Choose apache2
  • Configure phpMyAdmin:
    • During installation, configure database use settings.
    • Use the MySQL root user or other MySQL users (like wordpressuser).
  • Integrate phpMyAdmin with Apache:
sudo nano /etc/apache2/apache2.conf
  • Add
Include /etc/phpmyadmin/apache.conf
  • Restart Apache:
sudo systemctl restart apache2
  • Access phpMyAdmin:
    • http://<your_vps_ip>/phpmyadmin
No Comments

Send Comment Edit Comment


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
Previous