🎯server setup for high-traffic wordpress website.✔👁| news portal sites.
We have to setup two server one for database and one for wordpress file.
#database server setup.
step 1: Buy an instance from any cloud platform based on the required storage and other specifications.
step 2: Set up the database server:
- #install MySQL
commands: sudo apt update && upgrade -y
sudo apt install mysql-server
sudo mysql_secure_installation #' set or change the root password for the MYSQL server'
- #Configure MySQL
commands: #Edit the configuration file /etc/mysql/my.cnf
for MySQL
[mysqld]
bind-address = 0.0.0.0
sudo systemctl restart mysql
#Create Database and User
sudo mysql -u root -p
CREATE DATABASE wordpress_db;
CREATE USER 'wp_user'@'%' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON wordpress_db.* TO 'wp_user'@'%';
FLUSH PRIVILEGES;
EXIT;
#Configure Firewall
command: sudo ufw allow 3306
#wordpress file server setup:
- Buy another instance from the same cloud platform used for the database server.
commands: sudo apt update && upgrade -y
#configure cyberpannel and install wordpress.
Follow the instructions in this guide:
https://biren.hashnode.dev/cyberpanel-installation-in-linux-ubuntu-openlitespeed-wordpress-intsall-how-it-works-with-wordpress-site
#configure wp-config.php file (edit)
define('DB_HOST', 'database_server_ip');
#manage all required permission
- Directories should have 755
permissions.
- Files should have 644
permissions.
[note: If you encounter any issues or problems, feel free to contact me at birendra2783@gmail.com or +977 9821508997.]