How to Install WordPress Manually in cPanel | WordPress is one of the most popular content management systems (CMS) worldwide, powering over 40% of websites on the Internet. While many hosting providers offer one-click WordPress installation tools, knowing how to install WordPress manually in cPanel gives you greater control and a deeper understanding of your website’s backend. This step-by-step guide will walk you through the process.
Table of Contents
How to Install WordPress Manually in cPanel
Why Install WordPress Manually?
While automated installers like Softaculous are convenient, manual installation offers several benefits:
- Enhanced Customization: You can tailor the installation process to meet specific requirements, such as custom database configurations or specific folder structures.
- Better Understanding: Manual installation helps you learn the fundamental components of WordPress, including its file structure and database interactions.
- Control Over Database: You can now have more control over database settings, usernames, and permissions, which enhances your website’s security and performance.
Prerequisites
Before you begin, ensure you have the following:
- Web Hosting with cPanel Access: Most hosting providers offer cPanel as part of their hosting packages. Check your hosting plan to confirm cPanel access.
- A Domain Name: This will be the address of your WordPress site, such as
example.com
. - WordPress Software: Download the latest version of WordPress from wordpress.org. Always ensure you are downloading from the official website.
- FTP Client (Optional): Tools like FileZilla or Cyberduck can make file uploads easier, especially for large files or slow internet connections.
- Basic Knowledge of cPanel: Familiarity with the interface and features of cPanel will help streamline the process.
Step 1: Download WordPress
- Visit wordpress.org.
- Click on the Get WordPress button, which is prominently displayed on the homepage.
- Download the ZIP file containing the WordPress installation package.
- Save the file to a location on your computer for easy access during the upload step.
Step 2: Log in to cPanel
- Access your hosting account’s cPanel by typing
yourdomain.com/cpanel
into your browser. - Enter the username and password provided by your hosting provider.
Once logged in, you’ll see the cPanel dashboard, which contains various tools and options categorized under headings like Files, Databases, Domains, and Security.
Step 3: Create a MySQL Database
WordPress requires a database to store site data, such as posts, user information, and settings. Here’s how to create one:
- Locate the Databases Section: On the cPanel dashboard, find and click on MySQL Databases. This tool is typically found under the “Databases” category.
- Create a New Database:
- In the “Create New Database” field, enter a name for your database (e.g.,
wp_database
). - Click Create Database and wait for the confirmation message.
- In the “Create New Database” field, enter a name for your database (e.g.,
- Create a Database User:
- Scroll down to the “MySQL Users” section.
- Enter a username, create a strong password using the password generator, and clickUserate User.
- Assign User to Database:
- In the “Add User to Database” section, select the database and User you created from the dropdown menus.
- Click Add and assign All PrivilegesUserthe User by checking the box for all permissions.
- Click Make Changes to save your settings.
Please note the database name, username, and password; you will need these details for the configuration step.
Step 4: Upload WordPress Files
You need to upload WordPress files to your web server. Here’s how:
- Access File Manager:
- In the cPanel dashboard, locate the File Manager tool under the “Files” section.
- Click to open it and navigate to the
public_html
directory. This directory serves as the root folder for your website.
- Upload WordPress Files:
- Click the Upload button at the top of the File Manager interface.
- Select the WordPress ZIP file you downloaded earlier from your computer.
- Wait for the upload to complete, then return to the
public_html
directory.
- Extract the ZIP File:
- Right-click on the uploaded ZIP file and choose Extract from the context menu.
- Ensure that the files are extracted directly into the
public_html
directory. If they are extracted into a subfolder namedwordpress
, move them to thepublic_html
directory.
Step 5: Configure the wp-config.php File
The wp-config.php
file contains critical settings for your WordPress site, including database credentials. Follow these steps:
- Locate wp-config-sample.php:
- In the
public_html
folder, find thewp-config-sample.php
file.
- In the
- Rename the File:
- Right-click on the file and select Rename to change its name to
wp-config.php
.
- Right-click on the file and select Rename to change its name to
- Edit the File:
- Select the
wp-config.php
file and click Edit (or Code Editor) from the top menu. Update the following lines with your database details:
- Select the
define('DB_NAME', 'your_database_name');
define('DB_USER', 'your_database_user');
define('DB_PASSWORD', 'your_database_password');
define('DB_HOST', 'localhost');
Replace your_database_name
, your_database_user
, and your_database_password
with the details you created earlier. For localhost
please leave it as default.
- Save Changes:
- Click Save and close the editor.
Step 6: Run the WordPress Installer
- Open your browser and navigate to your domain, e.g.,
yourdomain.com
. - The WordPress installation wizard will appear. Follow the prompts:
- Choose a Language: Select your preferred language and click Continue.
- Site Title: Enter the name of your website.
- Username: Create an admin username (avoid generic usernames like “admin” for better security).
- Password: Set a strong password and note it down securely.
- Email Address: Provide an administrative email address for password recovery and notifications.
- Search Engine Visibility: Decide whether to discourage search engines from indexing your site during development.
- Click Install WordPress. Once the process is completed, you’ll see a success message.
Step 7: Log in to Your WordPress Dashboard
- Visit
yourdomain.com/wp-admin
. - Enter the admin username and password you created during installation.
- Click login to access your WordPress dashboard.
Congratulations! You’ve successfully installed WordPress manually using cPanel. From here, you can customize your site’s appearance, install plugins, and start adding content.
Troubleshooting Common Issues
- Error Establishing a Database Connection:
- Ensure the database credentials in the
wp-config.php
file is correct. - Verify that the database user has all the necessary permissions.
- Ensure the database credentials in the
- File Upload Errors:
- Check file permissions in cPanel. Files should typically have
644
permissions, and directories should have755
. - Ensure there is enough storage space on your hosting account.
- Check file permissions in cPanel. Files should typically have
- Blank Screen or Error Messages:
- Check your hosting server’s PHP version. WordPress requires PHP 7.4 or higher.
- Review the
error_log
file in cPanel for details about the issue.
Final Thoughts
Installing WordPress manually in cPanel is a valuable skill that gives you greater flexibility and control over your website. Understanding the process allows you to troubleshoot issues more effectively and customize your WordPress setup to suit your needs. Whether you’re a beginner or an experienced developer, mastering this method is a significant step in your WordPress journey.
FAQ
Can I install WordPress without cPanel?
Using command-line tools, you can use other control panels like Plesk or even install WordPress manually via SSH.
How do I secure my WordPress installation?
Use strong passwords, keep WordPress and plugins updated, and consider installing security plugins like Wordfence or Sucuri.
What should I do if I forget my admin password?
Use the “Forgot Password” link on the login page, or reset the password through phpMyAdmin in cPanel.
Can I change my database details after installation?
You can update the wp-config.php
file with new database credentials, but ensure the new database has all WordPress tables imported.
What is the recommended PHP version for WordPress?
WordPress recommends using PHP 7.4 or higher for optimal performance and security.
How do I move my WordPress site to a new host?
Use plugins like Duplicator or manually transfer files and databases to the new hosting environment, then update the wp-config.php
file accordingly.
Is manual installation better than using auto-installers?
Manual installation provides more control and insight, but auto-installers are quicker and easier for beginners.
0 Comments