How To Install WordPress on Ubuntu 14.04
How to Install WordPress on Ubuntu 14.04
If you're looking to install WordPress on Ubuntu 14.04, this tutorial will guide you through the process step-by-step.
Step 1: Update the System
The first step is to update your system by running the following command:
sudo apt-get update
Step 2: Install LAMP Stack
Next, you need to install the LAMP stack which includes Apache, MySQL, and PHP. Run the following command to install:
sudo apt-get install lamp-server^
Step 3: Create a MySQL Database for WordPress
Create a new MySQL database for WordPress. Run the following command:
mysql -u root -p
Enter your MySQL root password when prompted. Then create a new database:
CREATE DATABASE wordpress;
Create a new MySQL user and grant privileges:
CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpressuser'@'localhost';
FLUSH PRIVILEGES;
Replace "password" with a strong password of your choice.
Step 4: Download and Install WordPress
Download the latest version of WordPress from the official website. Run the following commands:
cd /tmp
wget https://wordpress.org/latest.tar.gz
Extract the downloaded file:
tar -zxvf latest.tar.gz
Move the extracted folder to your Apache web root:
sudo mv wordpress /var/www/html/
Step 5: Configure WordPress
Rename the sample configuration file:
cd /var/www/html/wordpress
cp wp-config-sample.php wp-config.php
Edit the configuration file:
sudo nano wp-config.php
Replace the following values:
define('DB_NAME', 'wordpress');
define('DB_USER', 'wordpressuser');
define('DB_PASSWORD', 'password');
Save and exit the editor.
Step 6: Configure Apache
Create a new Apache configuration file for WordPress:
sudo nano /etc/apache2/sites-available/
Комментарии
Отправить комментарий