To install WordPress with a LAMP (Linux, Apache, MySQL/MariaDB, PHP) stack on Ubuntu, you can follow these steps.
Step 1 : Set Up the LAMP Stack
If you're starting with a fresh Ubuntu 23.10 server, you'll need to install and configure the LAMP stack. Follow the detailed instructions in my guide on setting up a LAMP stack to ensure Apache, MySQL (or MariaDB), and PHP are properly installed and configured.
Step 2 : Create a Database and User for WordPress
- In the MariaDB prompt, create a database for WordPress and a user with privileges on that database:
Step 3 : Download and Configure WordPress
- Navigate to the web server directory:
- Use wget to download the latest version of WordPress:
- Create a directory named "example.com" and extract the contents of the WordPress archive into it:
- Set Permissions:
Step 4 : Configure Apache for WordPress
Add the following configuration:
Enable the new site:
Step 5 : Complete WordPress Installation
- Open your web browser and navigate to your domain or IP address. You should see the WordPress welcome page.
- Choose your preferred language for the WordPress installation and click on "Continue."
- On the next screen, you'll see information about the database you need to set up for WordPress. Fill in the following details:
- Database Name: Enter the name of the database you created earlier (e.g.,
wordpress
). - Username: Enter the database user (e.g.,
wordpressuser
). - Password: Enter the password you set for the database user.
- Database Host: Leave it as
localhost
. - Table Prefix: You can leave this as the default
wp_
.
- Click on "Submit" or "Run the installation" when you're done.
- On the next screen, fill in the basic information for your WordPress site:
- Site Title: Enter the name of your website.
- Username: Choose a username for the admin user.
- Password: Set a secure password for the admin user.
- Your Email: Enter your email address.
- Click on "Install WordPress" when you're ready.
- After a moment, you'll see a success message indicating that WordPress has been successfully installed. Click on the "Log in" button to access the WordPress login page.
- Enter the username and password and click on the "Log In" button.
Congratulations! You have successfully completed the installation of WordPress on your Ubuntu 23.10 server with a LAMP stack. You can now start customizing your website and creating content through the WordPress dashboard.