Get a free website with any plan

See how
WORDPRESS

Installing WordPress in a subdirectory

Sometimes you want WordPress to run at yourdomain.com/blog/ instead of the root, with the homepage hosted by something else (a static landing page, another CMS, a simple HTML site).

Easiest: from the install wizard

  1. Go to Services → click hosting → WordPress tab → Install.
  2. In Step 1, set the install path to your desired subdirectory (e.g., blog).
  3. Continue the wizard normally.

WordPress installs at /public_html/blog/ and is reachable at yourdomain.com/blog/. The homepage at yourdomain.com continues to serve whatever's at /public_html/index.html (or index.php).

What it looks like

  • Homepage: yourdomain.com → whatever you have at the document root.
  • WordPress: yourdomain.com/blog/ → WordPress site.
  • WP admin: yourdomain.com/blog/wp-admin/.
  • Subdirectory pages: yourdomain.com/blog/your-post-name/.

Subdirectory vs subdomain

A different option: install WordPress at a subdomain (blog.yourdomain.com) instead of a subdirectory. See Setting up subdomains.

Differences:

  • Subdirectory (yourdomain.com/blog): same domain. SEO-friendly — link equity flows.
  • Subdomain (blog.yourdomain.com): different host. Treated more like separate sites by some search engines (less link-equity flow).

Subdirectory is generally recommended for content meant to support the main site (a blog supporting a SaaS product, etc.). Subdomain is fine for genuinely separate sites.

Manual install in subdirectory

If you're not using the install wizard:

  1. Create the subdirectory: mkdir public_html/blog.
  2. Upload WordPress to the subdirectory.
  3. Run the WordPress installer: visit yourdomain.com/blog/wp-admin/install.php.
  4. Set the site URL during install: https://yourdomain.com/blog.

Same destination, slower path.

Permalink configuration

In WordPress admin → Settings → Permalinks. Pick a permalink structure (most common: "Post name").

WordPress generates the rewrite rules and writes them to /blog/.htaccess. The rules apply only within the subdirectory, leaving yourdomain.com/index.html alone.

When the homepage's content conflicts

A common issue: you have both yourdomain.com/index.html (your landing page) and yourdomain.com/index.php (which would be served if Apache prefers PHP).

Fix the order in .htaccess:

DirectoryIndex index.html index.php

This tells the server to look for index.html first, then index.php. Now your landing page wins for the root, but WordPress (which routes through index.php) still works for /blog/ and beyond.

SSL on subdirectory installs

We auto-issue a single SSL certificate for yourdomain.com and www.yourdomain.com, which covers the subdirectory automatically. No special config.

"Show WordPress on the homepage but install in a subdirectory"

A common WordPress pattern: install in /wordpress/ for cleanliness, but make the homepage at yourdomain.com serve WordPress content.

In WordPress admin → Settings → General:

  • WordPress Address (URL): https://yourdomain.com/wordpress
  • Site Address (URL): https://yourdomain.com (without subdirectory)

Then:

  • Copy index.php from /wordpress/ to the document root.
  • In the copy at the root, change require( __DIR__ . '/wp-blog-header.php' ); to require( __DIR__ . '/wordpress/wp-blog-header.php' );.
  • Copy .htaccess from /wordpress/ to root if needed.

Now WordPress files live in /wordpress/, but visitors hit yourdomain.com and see WordPress content. URLs in the address bar are clean — /about/ not /wordpress/about/.

This is documented at WordPress.org → Giving WordPress Its Own Directory.

Power-user note

For multi-site WordPress with subdirectories (one WordPress install serving yourdomain.com, yourdomain.com/site2, etc.), turn on WordPress Multisite. More complex but powerful — common pattern for SaaS products built on WordPress.

CAN'T FIND IT?

Real humans answer fast.

Hosting with us? Open a ticket and a real person replies - no scripts, no upsells. Still choosing a host? The same team is included with every plan, from day one.