Step 1: Access cPanel
Log in to your cPanel account using the credentials provided by your hosting provider, typically via yourdomain.com/cpanel.
Step 2: Create a Database
- In cPanel, go to the Databases section and click MySQL® Database Wizard or MySQL Databases.
- Create a new database:
- Enter a database name (e.g., wp_database).
- Click Create Database.
Step 3: Add a New User
- In the MySQL Databases section, find MySQL Users and click Add New User.
- Enter a username (e.g., wp_user) and a strong password.
- Click Create User.
Step 4: Add User to Database with Permissions
- In the MySQL Databases section, go to Add User to Database.
- Select the user (e.g., wp_user) and the database (e.g., wp_database).
- Click Add, then check ALL PRIVILEGES in the permissions window.
- Click Make Changes to save.
Step 5: Download WordPress Files
- Visit the official WordPress website and download the latest WordPress ZIP file.
- Save and extract the file to your computer.
Step 6: Upload Files to cPanel
- In cPanel, go to File Manager under the Files section.
- Navigate to the folder for WordPress installation (e.g., public_html for the main domain or public_html/blog for a subdirectory).
- Click Upload, select the extracted WordPress ZIP file, and upload it.
- Extract the ZIP file in the folder, moving the contents of the wordpress folder to the root of your chosen directory if needed.
Step 7: Configure wp-config.php
- In File Manager, find the wp-config-sample.php file in the WordPress folder.
- Edit the file to add your database details:
- Replace database_name_here with your database name (e.g., wp_database).
- Replace username_here with your database user (e.g., wp_user).
- Replace password_here with the user’s password.
- Ensure DB_HOST is set to localhost (or confirm with your host if different).
- Save the file and rename it to wp-config.php.
Step 8: Run the WordPress Installer
- In your browser, go to your domain (e.g., yourdomain.com or yourdomain.com/blog).
- The WordPress installation screen will appear. Follow the prompts:
- Select a language.
- Enter your site title, admin username, password, and email.
- Click Install WordPress.
- Log in to the WordPress admin dashboard at yourdomain.com/wp-admin.
Step 9: Create an Article in WordPress
- Log in to WordPress: Access the dashboard at yourdomain.com/wp-admin.
- Navigate to Posts: Click Posts > Add New in the left-hand menu.
- Add a Title: Enter a title, e.g., “My First Blog Post”.
- Write Content: Use the block editor to add content. For example:
- Add a Paragraph block: “Welcome to my blog! This is my first article about WordPress.”
- Add an Image block: Upload an image to enhance the post.
- Set Categories/Tags: In the right sidebar, add a category (e.g., “Blog”) and tags (e.g., “WordPress, Tutorial”).
- Add a Featured Image: Upload an image in the sidebar under the Post tab.
- Publish: Click Publish to make the article live, or save as a draft to edit later.
One response to “how to install wordpress in cpanel”
https://shorturl.fm/pb2xM