Guide WordPress

How to install WordPress on your hosting

The one-click route, the manual route, and the handful of setup choices that are annoying to change later.

Updated 8 min read Beginner

There are two ways to install WordPress, and for almost everybody the first one is the right one. The manual route is worth knowing anyway, because it is what you fall back on when something has gone wrong with an installation you did not create.

Method 1: the one-click installer

Your hosting control panel has an application installer that creates the database, downloads WordPress, writes the configuration and sets up the admin account in a single operation. It takes about a minute.

  1. Open the application installer

    Look for the section of your control panel dealing with one-click installs or applications, and choose WordPress from the list.

  2. Choose where it goes

    Pick the domain, and leave the directory field empty to install at the root. Filling it in puts the site at example.com/whatever-you-typed, which is the single most common accidental outcome of this screen.

  3. Set the admin account

    Three things matter here, and all three are irritating to change afterwards:

    • Username — anything except admin. Automated attacks try that name first, every time, on every WordPress site on the internet.
    • Password — long and unique. Let the installer generate one and put it in a password manager.
    • Email — an address you can actually receive at. It is where password resets go, and getting it wrong is how people lock themselves out on day one.
  4. Set the site title and install

    The title is editable later, so do not agonise. Run the install and wait for the confirmation, which will include your admin URL — normally yourdomain.com/wp-admin.

Installing over an existing site

The installer will happily overwrite a folder that already contains a website. If you are reinstalling, back up first and check the target directory is the one you mean.

Method 2: installing manually

Useful when you want a specific version, when you are restoring a site by hand, or when the installer is not available.

  1. Create a database and user

    In your control panel, create a MySQL database and a user, then grant that user full access to that database. Write down all three values — database name, username, password.

  2. Upload WordPress

    Download the latest release from wordpress.org, and upload the contents of the wordpress folder — the contents, not the folder itself — into your web root.

  3. Create wp-config.php

    Copy wp-config-sample.php to wp-config.php and fill in your database details:

    define( 'DB_NAME', 'your_database' );
    define( 'DB_USER', 'your_user' );
    define( 'DB_PASSWORD', 'your_password' );
    define( 'DB_HOST', 'localhost' );

    Then replace the block of authentication keys and salts with a fresh set from the generator that the file itself links to. They are what sign your login cookies; leaving the sample placeholders in place is a real weakness, not a cosmetic one.

  4. Run the installer

    Visit your domain in a browser. WordPress detects that it is unconfigured and walks you through the site title and admin account.

The five things to do immediately after

A fresh install is not a finished setup. These take a few minutes and save a great deal of trouble.

Go to Settings → Permalinks and choose Post name. The default puts a query string in every URL, which is worse for readers and for search engines, and changing it after you have published and been indexed means setting up redirects.

2. Confirm the site is on HTTPS

Check that Settings → General shows both the WordPress Address and Site Address beginning https://. Free SSL is included on our plans and is normally active as soon as the domain points at the account.

3. Delete what you are not using

Remove the sample page, the "Hello world!" post, and any themes and plugins you will not use. Inactive plugins still contain code on the server, and out-of-date inactive plugins have been the way into plenty of sites.

4. Decide how updates happen

Minor and security releases install themselves by default, which you should leave alone. For major releases and plugins, decide deliberately — automatic updates keep you patched but can break a site unattended; manual updates are safer only if you actually do them. See updating WordPress safely.

5. Take a backup before you build

A backup of an empty site sounds pointless and is not: it is a known-good state to return to when something you install on day three breaks everything. See backing up a WordPress site.

If something went wrong

  • A database connection error — the credentials in wp-config.php do not match. See fixing it.
  • A blank white page — a PHP error is being hidden. See debugging a blank page.
  • The home page works but every other page 404s — permalinks. Re-save Settings → Permalinks and see the full fix.
  • A default hosting page instead of the site — the files are in the wrong folder, or DNS is not pointing here yet.

Frequently asked questions

Is WordPress free?

The software is free and open source. What costs money is hosting, a domain, and any premium theme or plugin you choose to buy. A perfectly good site can be built without spending anything beyond hosting and the domain.

Should I install in a subfolder or at the root?

The root, unless you have a specific reason not to. A site at example.com is simpler than one at example.com/blog, and moving it later is a job in itself.

Can I install WordPress more than once on one account?

Yes — once per domain or subdomain, each with its own database. Check your plan's database and storage limits if you intend to run several.

Related reading