Two ways to install WordPress in cPanel
There are two common ways to install WordPress in cPanel:
- An auto-installer. Some hosts add an application installer to cPanel, usually under a Software heading. It creates the database and copies the files for you. Whether one is present depends on what your host has added, so check your own cPanel.
- The manual method. You download WordPress from wordpress.org, upload it, create a database, and run the official installer. It works on every cPanel account and teaches you where everything lives, which helps later when you troubleshoot.
This guide covers the manual method in full. It takes about 15 minutes.
ODHOST note: ODHOST shared plans come with a control panel, and that panel is cPanel, so these steps match your screen. Whether an auto-installer is available in your cPanel has not been confirmed for every plan, so look in the Software section or open a support ticket. The manual steps below use only standard cPanel tools, so they work either way.
Check the requirements first
WordPress.org publishes recommended server requirements. At the time of writing they are:
| Requirement | Recommended |
|---|---|
| PHP | Version 8.3 or greater |
| Database | MySQL 8.0 or greater, or MariaDB 10.11 or greater |
| HTTPS | Supported |
| Web server | Apache or Nginx recommended; any server with PHP and MySQL support works |
WordPress can still run on older PHP and MySQL versions, but those versions are past end of life and no longer receive security fixes. Check your PHP version in cPanel (often under MultiPHP Manager or a PHP selector, depending on the host) and see changing the PHP version in cPanel if you need a newer one.
You also need:
- A domain already pointing at your hosting. If not, see how to connect a domain to hosting.
- Your cPanel login from the welcome email.
- About 100 MB of free disk space for a fresh install.
Step 1: Download WordPress
- Go to wordpress.org/download and download the latest
.zipfile. - Keep it as a zip. Uploading one zip and extracting it on the server is much faster than uploading thousands of individual files.
Always download from wordpress.org. Copies from other websites may be outdated or modified.
Step 2: Upload the files with File Manager
- Log in to cPanel and open File Manager.
- Open
public_html. This is the web root for your main domain. For a different domain or subdomain, open its document root instead. - If
public_htmlcontains a placeholderindex.htmlordefault.htmlfrom the host, delete it. - Click Upload, select the WordPress zip and wait until it shows 100%.
- Back in File Manager, right click the zip and choose Extract. This creates a folder called
wordpress. - Open the
wordpressfolder, select all files and folders, and Move them topublic_html. - Delete the now empty
wordpressfolder and the zip file.
When you finish, public_html should contain wp-admin, wp-content, wp-includes and files such as index.php and wp-config-sample.php directly inside it. If they are still inside public_html/wordpress, your site will load at yourbusiness.in/wordpress instead of the home page.
FTP works too, and is better for slow connections. See uploading files with File Manager or FTP.
Step 3: Create the database and user
WordPress stores posts, pages, settings and users in a MySQL or MariaDB database.
- In cPanel, open MySQL Database Wizard (or Manage My Databases for the non wizard version).
- Enter a database name, such as
wp. cPanel adds your account username as a prefix, so the full name becomes something likeyourcpuser_wp. - Create a database user, such as
wpuser. It also gets the prefix:yourcpuser_wpuser. - Use the password generator for a long random password. Copy it somewhere safe.
- On the privileges screen, tick ALL PRIVILEGES and save.
Write down the three values exactly as cPanel shows them:
Database name: yourcpuser_wp
Database user: yourcpuser_wpuser
Password: (the generated password)
The create a MySQL database help article has screenshots of each screen.
Step 4: Run the WordPress installer
- Visit
https://yourbusiness.in(orhttp://if SSL is not active yet). The WordPress setup screen appears. - Choose your language, for example English (India).
- Enter the database details:
- Database Name:
yourcpuser_wp - Username:
yourcpuser_wpuser - Password: the generated password
- Database Host:
localhoston most cPanel accounts - Table Prefix: change
wp_to something less predictable, such asyb7_
- Database Name:
- Click Submit, then Run the installation.
- Enter the site title, an admin username (not
admin), a strong password and your email address. - Decide on search engine visibility. Tick "Discourage search engines" only while the site is under construction, and remember to untick it at launch.
- Click Install WordPress and log in at
yourbusiness.in/wp-admin.
If the installer cannot write wp-config.php itself, it shows the file contents. Copy them, create wp-config.php in public_html with File Manager, paste and save. The relevant lines look like this:
define( 'DB_NAME', 'yourcpuser_wp' );
define( 'DB_USER', 'yourcpuser_wpuser' );
define( 'DB_PASSWORD', 'your-generated-password' );
define( 'DB_HOST', 'localhost' );
$table_prefix = 'yb7_';
If you see "Error establishing a database connection", one of these four values is wrong. The database connection fix explains how to check each.
Step 5: Harden WordPress after installing
A fresh install is clean, but it needs a few settings before you build the site. These follow the WordPress hardening guide.
- Turn on HTTPS. Confirm the SSL certificate is active (ODHOST shared plans include a free SSL certificate), then set both URLs in Settings → General to
https://. - Set permissions. Folders 755, files 644. The hardening guide suggests 400 or 440 for
wp-config.phpwhere the server allows it. - Delete what you do not need. Remove default themes you will not use and the Hello Dolly plugin.
- Install only trusted plugins from wordpress.org or reputable vendors, and keep them few.
- Enable updates. Keep automatic minor updates on and check for plugin and theme updates weekly.
- Add two factor authentication for admin accounts with a reputable plugin.
- Disable file editing in the dashboard by adding this line to
wp-config.php, above the "That's all, stop editing" comment:
define( 'DISALLOW_FILE_EDIT', true );
- Set up backups. ODHOST shared plans list weekly backups. Keep your own copy too, especially before major updates.
The guide on how to secure a website covers ongoing security in more depth.
Common problems and fixes
| Problem | Likely cause | Fix |
|---|---|---|
| Site shows the old placeholder page | index.html still in public_html |
Delete it |
Site loads only at /wordpress |
Files not moved out of the subfolder | Move contents up to public_html |
| Database connection error | Wrong name, user, password or host | Recheck the prefixed values |
| Upload limit error for themes | PHP upload_max_filesize too low |
Raise it in cPanel PHP settings, or upload by FTP |
| "Not secure" in the browser | SSL not active or URLs still http:// |
Check SSL/TLS Status and the General settings |
Choosing a plan for WordPress
A single brochure site or blog runs comfortably on an entry plan. If you plan to host several sites, such as a main site, a blog and a staging copy, count the websites and databases you need. ODHOST shared plans range from Spark (1 website, 5 databases, ₹99 per month) to Elite (unlimited websites and databases, ₹799 per month); applicable taxes are shown at checkout. See WordPress hosting for plan details, and what cPanel is if you want to know the rest of the control panel.
Frequently asked questions
Do I need to know coding to install WordPress in cPanel?
No. The manual method uses cPanel's File Manager and database tools plus a web based installer. You copy and paste a few values; no code is required.
Can I install WordPress in a subfolder or subdomain?
Yes. Upload the files to a subfolder such as public_html/blog for yourbusiness.in/blog, or to the document root of a subdomain created in cPanel. Each installation needs its own database or a unique table prefix.
What database host should I use in the WordPress installer?
On most cPanel accounts the database host is localhost. If the installer cannot connect, check the value with your host before changing anything else.
Does ODHOST have a one step WordPress installer in cPanel?
Check the Software section of your cPanel or ask support. The manual method in this guide works on every ODHOST shared plan because it uses standard cPanel tools.