This tutorial will guide you through the complete installation process for the latest version of WordPress. While a full website setup includes server selection and environment configuration, this article focuses specifically on the WordPress installation steps. For information on server selection and setting up a base environment (like LNMP/LAMP), please refer to other relevant tutorials.
Prerequisites
Before you begin installing WordPress, ensure you have completed the following preparations:
- Purchased a domain name and server (shared hosting/VPS) and configured DNS resolution.
- Server environment is ready, typically requiring support for PHP (version 7.4 or higher) and a MySQL/MariaDB database.
- Have FTP/SFTP access to your server or access to a file manager (like cPanel or Plesk).
Step 1: Download the WordPress Installation Package
Visit the official WordPress website to download the latest WordPress installation package (.zip format). This is the safest and most recommended method.
Note: Always download from the official website or a trusted mirror to ensure file integrity and the absence of malicious code.
Step 2: Upload and Extract Files
Upload the downloaded wordpress-x.x.x.zip file to your website's root directory (e.g., /public_html or /var/www/html/yourdomain.com).
Using a common file manager or FTP client:
- Navigate to your website's root directory.
- Upload the WordPress ZIP file.
- Extract the archive. This creates a
wordpressfolder. - Move all contents from the
wordpressfolder into the root directory, or configure your web server to point to thewordpressfolder directly.
Step 3: Create a Database
WordPress requires a MySQL database to store its data. Create a new database using your hosting control panel (e.g., cPanel's MySQL Database Wizard) or phpMyAdmin. Record the following details:
- Database Name
- Database Username
- Database Password
- Database Host (usually
localhost)
Step 4: Run the WordPress Installer
- In your browser, visit your domain (e.g.,
https://yourdomain.com). - You will see the WordPress language selection screen. Choose your language and continue.
- An information page will appear, stating that database details are needed. Click the "Let's go!" button.
- On the database configuration page, enter the information you recorded in Step 3.
- Database Name: Enter the name you created.
- Username: Enter the database username.
- Password: Enter the corresponding password.
- Database Host: Typically, leave as
localhost. - Table Prefix: For security, it's recommended to change the default
wp_to a different prefix (e.g.,wp2025_).
- Click the "Submit" button. If the information is correct, you will see a "All right, sparky! You've made it through this part of the installation. WordPress can now communicate with your database. If you are ready, time now to…" message. Click "Run the installation".
Step 5: Configure Site Information
This is the final installation step, where you set up your website's basic information:
- Site Title: The name of your website.
- Username: The account you will use to log into the WordPress admin dashboard (avoid common usernames like
admin). - Password: Set a strong password (the system generates one; you can use it or create a more complex one).
- Your Email: Used to receive website notifications and admin-related emails.
- Search Engine Visibility: If your site is not ready to be public, you can check this box to discourage search engines from indexing it.
After filling in the details, click the "Install WordPress" button. After a moment, you will see a "Success!" message. Click the "Log In" button to access the WordPress admin dashboard (typically at https://yourdomain.com/wp-admin) using the username and password you just set.
Post-Installation Recommendations
- After logging in, go to Settings → Permalinks and change the permalink structure (selecting "Post name" is recommended for SEO).
- Go to Appearance → Themes to install and activate a theme suitable for your website type.
- Install necessary plugins from the Plugins menu based on your needs (e.g., caching, security).
You have now successfully installed and initially configured WordPress. You can begin creating content and customizing your site's appearance and functionality.