How to install WordPress on a UFO.Hosting server
WordPress is the most popular CMS today. It is clear, easy to use, quickly installed and suitable for almost any project: from a personal blog to the official website of a company or online store.
Even in manual mode, its installation takes no more than 10 minutes. We’ll tell you step by step how to do this.
What will you need before installation?
Before you start installing WordPress, make sure you have everything you need:
- Virtual server with Linux installed. For example, Ubuntu, Debian or any other Linux distribution.
- Access via SSH to the server. After ordering a server, you will receive an IP address, login and password. With their help, you can connect to the server and execute commands. Learn more about gaining SSH access to the server read our instructions.
- Access to the server database. WordPress stores content and settings in a database. You can use an existing one or create a new one.
Step 1. Preparing the server
First, you’ll need to install a LAMP stack, a popular set of software used to run web servers. It includes:
- operating system Linux — it will already be on the server, so you won’t need to install it separately;
- web server Apache;
- MySQL database or MariaDB;
- programming language PHP.
Optionally, Apache can be replaced with the faster and lighter Nginx web server. It is especially relevant for high-load sites for which performance is important.
Web server installation
- First, update the packages on the system:
sudo apt update && sudo apt upgrade
- Next install Apache:
sudo apt install apache2
- Enable and start the web server:
sudo systemctl enable apache2
- Check the web server using the command:
systemctl status apache2
Installing PHP
Now install PHP and all the required modules using the command:
sudo apt install -y php php-{common,mysql,xml,xmlrpc,curl,gd,imagick,cli,dev,imap,mbstring,opcache,soap,zip,intl}
If in doubt, you can check the PHP version to be sure:
php -v
Database installation
For example, we’ll install MariaDB, but you can also use MySQL:
sudo apt install mariadb-server mariadb-client
sudo systemctl enable --now mariadb
systemctl status mariadb
Step 2. Create a database for the site
To do this you will need to complete several steps:
- Connect to MySQL:
sudo mysql -u root -p
- Create a database for WordPress:
CREATE DATABASE wordpress_db;
- Create a user for the database:
CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'your_secure_password';
- Grant the user rights to the database:
GRANT ALL PRIVILEGES ON wordpress_db.* TO 'wp_user'@'localhost';
5.Apply changes:
FLUSH PRIVILEGES;
- Quit MySQL:
EXIT;
Step 3: Download and Setup WordPress
- Follow the link to the official website wordpress.org and download the latest version of WordPress. We do not recommend downloading CMS from unverified resources — this way you risk introducing viruses to the server.
- Upload the WordPress distribution to the server:
cd /tmp
wget https://wordpress.org/latest.tar.gz
tar -xvf latest.tar.gz
sudo cp -R wordpress /var/www/html/
- Set owner and rights:
sudo chown -R www-data:www-data /var/www/html/wordpress
sudo chmod -R 755 /var/www/html/wordpress
Step 4. Setting up a connection to the database
- Go to the site folder:
cd /var/www/html/wordpress
- Copy the configuration file:
cp wp-config-sample.php wp-config.php
sudo chown www-data:www-data wp-config.php
- Open the file
wp-config.php
sudo nano wp-config.php
- Change the following lines:
define( 'DB_NAME', 'wordpress_db' );
/** MySQL database username */
define( 'DB_USER', 'wp_user' );
/** MySQL database password */
define( 'DB_PASSWORD', 'your_secure_password' );
/** MySQL hostname */
define( 'DB_HOST', 'localhost' );
change wordpress_db to the name of the database
wp_user is changed to the username
change your_secure_password to the specified password
Step 5: Configuring Apache
To do this we do the following:
- Go to the catalog
/etc/apache2/sites-availableand copy the file000-default.conf.
cp 000-default.conf wordpress.conf
- Editing the file
wordpress.confand add the following lines:
DocumentRoot /var/www/html/wordpressServerName Server_IP
Server_IP needs to be replaced with IP VPS
- Activate the site and restart Apache:
a2ensite wordpress.confa2dissite 000-default.confservice apache2 reload
Step 6: Complete installation
- Open the server IP address in the browser:
- Then WordPress itself will prompt you to complete the installation. Enter the site name, administrator login and password, and email address. After this, everything will be ready and you will be taken to the WordPress admin area.
CONTENT:
Similar
Похожее
Все новости
Adaxa Suite: подробный обзор ERP-системы корпоративного класса
Adaxa Suite — комплексная ERP-платформа для компаний, которым уже тесно в рамках простых учётных систем, но которые при этом не готовы идти в сторону дорогих корпоративных решений уровня SAP или Oracle. Изначально продукт создавался для среднего бизнеса, которому нужна большой набор функций, сквозная автоматизация процессов и надёжная архитектура без чрезмерной стоимости владения. Архитектура и техническая […]
Как заказать дополнительные IP-адреса на UFO.Hosting: пошаговая инструкция
По мере роста проекта одного IP-адреса может стать недостаточно. Это типичная ситуация для компаний, которые масштабируют инфраструктуру, запускают новые сервисы или разделяют внутренние процессы. В UFO.Hosting подключение дополнительных IP-адресов выполняется через биллинговую панель и занимает всего несколько минут. Важно: возможность для заказа дополнительных IP-адресов доступна для тарифов VPS начиная с Haedus. Зачем нужны дополнительные IP-адреса […]