Learning how to install WordPress takes minutes, and you have more than one route. Most people use their host’s one-click installer. Developers and anyone on a bare server use the manual method, the famous “five-minute install”. And if you just want to experiment, you can run WordPress on your own computer or even in the browser. This guide walks through all three, then gives you a checklist of the settings to fix before you publish anything.
Before you start
For a public site you need three things:
- A web host that meets the WordPress requirements: a current PHP version, MySQL or MariaDB, and HTTPS support. Our guide to hosting WordPress explains the options.
- A domain name pointed at that host.
- A strong admin password and an email address you check, since WordPress sends password resets and notifications there.
Decide on your admin username now too. Avoid admin, which is the first name automated login attacks try. If you are new to the platform, our explainer on what WordPress is covers the basics, including the difference between self-hosted WordPress and WordPress.com. This guide is about the self-hosted software.
Method 1: the one-click installer
Nearly every WordPress-friendly host offers an automatic installer, either in a proprietary dashboard or through a tool such as Softaculous inside cPanel. Many managed hosts go further and create a WordPress site for you when you sign up. The exact screens vary, but the flow is the same:
- Log in to your hosting control panel and find the WordPress or “Auto Installer” section.
- Choose the domain and protocol. Pick
https://and decide betweenwwwand the bare domain now; changing later is possible but fiddly. - Leave the directory field empty to install at the root of the domain, unless you deliberately want the site in a subfolder such as
/blog. - Enter the site title, admin username, password and email.
- Untick any bundled extras you do not want. Installers sometimes add plugins or themes by default.
- Click Install, wait for the confirmation, then log in at
yourdomain.com/wp-admin/.
One-click installs are reliable and handle the database for you. The only downside is that you may inherit the host’s choices: preinstalled plugins, a default theme, or a database table prefix you did not pick. Review them after installation.
Method 2: how to install WordPress manually
The manual install is the original method and still useful on a VPS, a server without an installer, or when you want full control. The official installation guide covers edge cases; here is the standard path.
Step 1: download WordPress
Get the latest release from the official wordpress.org download page, never from a third-party mirror. Unzip it on your computer, or download it directly on the server. Our guide on how to download WordPress explains what is in the package and how to verify it.
Step 2: create a database and user
In your control panel (look for “MySQL Databases”) or with the MySQL command line, create an empty database and a user with a strong password, then grant that user all privileges on that database only. Use the utf8mb4 character set. Note the database name, username, password and host. The host is often localhost, but some providers use a separate database server address.
CREATE DATABASE wp_site DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'use-a-long-random-password';
GRANT ALL PRIVILEGES ON wp_site.* TO 'wp_user'@'localhost';
FLUSH PRIVILEGES;
Step 3: upload the files
Upload the contents of the wordpress folder (not the folder itself, unless you want the site in a subdirectory) to your web root, often called public_html or htdocs. Use SFTP rather than plain FTP. On a server with SSH it is faster to download and unzip there.
Step 4: configure wp-config.php
You can let the installer create this file for you in the next step, but doing it by hand is useful when the web server cannot write files. Copy wp-config-sample.php to wp-config.php and fill in your database details:
define( 'DB_NAME', 'wp_site' );
define( 'DB_USER', 'wp_user' );
define( 'DB_PASSWORD', 'use-a-long-random-password' );
define( 'DB_HOST', 'localhost' );
define( 'DB_CHARSET', 'utf8mb4' );
$table_prefix = 'wp_';
Then replace the placeholder authentication keys and salts with unique random values. The WordPress secret-key service at https://api.wordpress.org/secret-key/1.1/salt/ generates a fresh block you can paste in. Changing the table prefix from wp_ is optional; it is a minor obscurity measure, not real security.
Step 5: run the five-minute install
Visit your domain in a browser. WordPress detects that it is not installed and opens the setup screen (if not, go to /wp-admin/install.php). Choose the language, then enter the site title, username, password and email. There is also a “Search engine visibility” checkbox: tick it only if you want to discourage indexing while you build. Click Install WordPress, and you are done.
The command-line alternative
If WP-CLI is available on your server, the whole manual process becomes three commands:
wp core download
wp config create --dbname=wp_site --dbuser=wp_user --dbpass=use-a-long-random-password --dbhost=localhost
wp core install --url=https://example.com --title="My Site" --admin_user=yourname --admin_email=you@example.com --prompt=admin_password
wp config create generates fresh salts automatically, and --prompt=admin_password keeps the password out of your shell history.
Method 3: a local or browser-based install
For learning, building a theme or testing updates, a local site is faster and private. You do not need a host or domain.
- WordPress Studio is a free desktop app from Automattic for macOS and Windows. It creates local WordPress sites in a few clicks without needing a separate server stack, and includes options to share a preview of a local site.
- LocalWP (Local) is a free, long-established local development app for macOS, Windows and Linux. It lets you pick PHP and web server versions per site, and includes tools such as a mail catcher and database access.
- WordPress Playground runs WordPress entirely in your browser using WebAssembly. Nothing to install; great for quick tests, though sites are temporary unless you export them.
- Developer tools such as
wp-env(Docker-based, from the WordPress project) or a traditional stack like MAMP or XAMPP suit developers who want more control.
When a local site is ready to go live, you move it to a host the same way you would migrate any site: copy files and database, update the URL with a serialization-safe search-replace, and point the domain.
Post-install checklist
Knowing how to install WordPress is half the job; the first half-hour afterwards sets up the site properly. Work through these before publishing:
- Settings → General: confirm the site title, tagline, both addresses use
https://, and set the correct timezone, date and time format. - Settings → Permalinks: choose “Post name” or another readable structure now. Changing it later breaks existing links unless you add redirects.
- Settings → Reading: choose whether the front page shows latest posts or a static page, and make sure “Discourage search engines” is unticked when you launch.
- Settings → Discussion: decide whether you want comments at all, and if so, enable moderation.
- Delete sample content: the “Hello world!” post, the sample page and the default comment.
- Remove what you will not use: unused plugins and extra default themes. Keep one default theme as a fallback.
- Choose and configure a theme. See our guide to choosing a WordPress theme.
- Set up backups, either through your host or a backup plugin with off-site storage.
- Secure the login: a unique password, two-factor authentication, and keeping core, themes and plugins updated. Our security hardening guide goes further.
- Check Tools → Site Health and fix anything flagged as critical.
Troubleshooting common install errors
- “Error establishing a database connection”: one of the four database values in
wp-config.phpis wrong, the user lacks privileges, or the database server address is notlocalhost. - A directory listing or download instead of the setup screen: the server is not running PHP for that folder, or the files landed in the wrong directory.
- A blank white page: usually a PHP error. Temporarily set
WP_DEBUGtotrueinwp-config.phpto see the message, and check the PHP version. - Redirect loops or mixed-content warnings after enabling HTTPS: make sure both addresses in Settings → General use
https://, and check any proxy or CDN SSL settings.
Frequently asked questions
How long does it take to install WordPress?
A one-click or local install takes a few minutes. A manual install takes a little longer the first time, mostly spent creating the database and uploading files.
Can I install WordPress in a subfolder?
Yes. Install it in a directory such as /blog and the site runs at that path. You can also install WordPress in a subfolder but serve it from the domain root; the official documentation describes how to give WordPress its own directory.
Can I run several sites from one install?
Yes, with WordPress Multisite, which you enable after a normal install. It suits networks of related sites managed together, not unrelated client sites.
Key takeaways
- The one-click installer is the easiest way to install WordPress on most hosts; review any bundled extras afterwards.
- The manual method is download, create a database, upload, configure
wp-config.php, and run the setup screen. - WP-CLI reduces a manual install to three commands.
- WordPress Studio, LocalWP and Playground give you a free test site with no host needed.
- Set permalinks, timezone, reading settings, backups and login security before you publish.