Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
VGSources
Blog

How to Move WordPress to a /blog Folder While Keeping a Custom Front Page

Move WordPress core into /blog without losing your root homepage. This guide covers URL settings, backups, the root index loader, static Home and Blog pages, theme templates, permalinks, media links, and recovery.
Length10 min Posted Quest giverVGSources Team

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can keep a public homepage at https://example.com/, store WordPress core in https://example.com/blog/, and show posts at a separate Blog page. The safe method is to back up the files and database, change WordPress’s two URL settings deliberately, move the core files, restore the root loader, refresh permalinks, and then assign separate Home and Blog pages in Reading settings.

The key distinction is that WordPress Address (URL) points to the directory containing the core files, while Site Address (URL) is the public address visitors use. They are different values in this setup.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The URL and file layout you are building

A successful migration separates the location of WordPress’s PHP files from the address visitors see. For a domain named example.com, the intended arrangement is:

Item Value or location Purpose
WordPress Address (URL) https://example.com/blog The directory containing wp-config.php, wp-admin, wp-content, and wp-includes.
Site Address (URL) https://example.com The public address typed by visitors; it is also where the front page is served.
Core files Server directory such as /blog/ Holds the WordPress installation after the move.
Public entry point /index.php at the document root Loads WordPress from the /blog/ directory.
Front page https://example.com/ A published static page selected as Homepage.
Posts index Usually a published page with the slug blog, or another assigned Posts page Displays the theme’s post archive rather than the page’s normal body content.

Both URL fields should use https:// and omit a trailing slash. WordPress trims a trailing slash in these settings, but entering the canonical form avoids confusion when checking configuration files and redirects.

Decide whether this architecture fits

Moving core files into a subdirectory is useful when the root contains a custom landing page, another application, or a deliberately clean public document root. It does not create a second WordPress site. The same database, theme, plugins, users, and uploads continue to power the site; only the core-file location and public entry point change.

Approach Public URLs File layout Front-page control Main operational concern
Root site with core in /blog Homepage at /; posts can be at /blog/ or another Posts-page URL Core in /blog/; root loader required Reading settings plus the active theme’s templates Rewrite rules, directory conflicts, and stale links must be checked after the move.
Site whose public address includes /blog Visitors reach the whole site below /blog/ Core and public entry point live under that path Normal WordPress front-page settings The root domain is no longer the WordPress site’s public homepage.
All files in the document root Homepage at / Core, themes, plugins, and uploads in the root installation Reading settings and theme templates No subdirectory relocation, but the root remains occupied by WordPress files.

The rest of this guide assumes the first design: a root homepage with WordPress core in /blog/.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Prepare a rollback before touching either URL

A URL change can make the dashboard appear unavailable even when the database is intact. Make a restorable backup before changing settings or moving files.

  • Export the complete WordPress database, not only selected tables.
  • Copy the entire current WordPress directory, including wp-content/uploads, themes, plugins, languages, and any files added by your host or deployment process.
  • Back up other files in the document root, including an existing index.php, .htaccess, robots file, verification files, and custom assets.
  • Record the current WordPress Address, Site Address, permalink structure, active theme, and any server-level redirects.
  • Confirm that you can restore both the database and files independently. A database-only backup cannot restore missing media or plugins.

Keep the old files untouched until the new arrangement has passed testing. If your host provides snapshots, take one immediately before the URL change as an additional rollback point.

Move the installation safely

Perform the following sequence in one maintenance window. The interval between saving the new URL values and moving the files is intentionally short: do not browse the public site during it.

  1. Confirm the destination and document root

    Create or reserve the server directory that will become /blog/. Verify that the domain’s document root is the parent directory where the public index.php should live. Do not nest the new directory inside the old WordPress directory by accident.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  2. Change the two URL settings

    Sign in to WordPress and open Settings → General. Set WordPress Address (URL) to https://example.com/blog. Set Site Address (URL) to https://example.com. Use your real domain, keep the https:// scheme, and leave off the final slash. Save the changes once.

  3. Move the core files and directories

    Immediately move the WordPress core files and subdirectories into /blog/. This includes wp-admin, wp-includes, wp-content, wp-config.php, and the installation’s other root files. Preserve permissions and ownership. Do not move unrelated root assets that belong to another application.

  4. Provide the root loader

    Place a public index.php in the document root. It must load WordPress’s bootstrap file from the new subdirectory rather than from the root. The existing WordPress root index can be copied to the document root and its bootstrap path adjusted from the root location to /blog/wp-blog-header.php. Keep the file’s PHP opening tag and require statement syntactically valid.

    <?php
    require __DIR__ . '/blog/wp-blog-header.php';

    If the root already contains an application entry point, do not overwrite it blindly. Route requests through that application’s documented integration instead, or place WordPress in a non-conflicting directory and use server rules appropriate to the host.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  5. Open the new administrative location

    Use the public domain to reach the login, trying https://example.com/wp-admin/ or https://example.com/wp-login.php if the first path does not redirect correctly. The dashboard files themselves are now under /blog/, but the Site Address controls the public links.

  6. Regenerate rewrite rules

    Open Settings → Permalinks and click Save Changes without changing the selected structure. This regenerates rewrite rules in the directory containing the main WordPress index and often resolves post, page, feed, and archive 404 errors created by the move. If WordPress reports that it cannot write the rules file, copy the displayed rules into the appropriate server configuration or ask the host to apply them.

  7. Run the first functional test

    Check the homepage, the intended posts index, an individual post, an ordinary page, the login and dashboard, an uploaded image, a feed, and a menu link. Test in a private browser window so cached redirects do not hide a problem.

Create a separate custom front page and posts page

The file move and the front-page choice are related but separate tasks. WordPress needs one page to represent the homepage and another page to represent the posts index.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Publish the Home page

    Go to Pages → Add New, create a page named Home, add the content or blocks you want visitors to see, and publish it. Its slug can be the site root when it is selected as the Homepage; the page title itself does not determine the URL.

  2. Publish a separate Blog page

    Create and publish another page named Blog. It is normally empty because WordPress and the theme supply the posts loop. Do not place a hand-built list of posts in its editor and expect that content to control the archive.

  3. Select a static front page

    Open Settings → Reading. Under the homepage display option, choose A static page. Select Home for Homepage and Blog for Posts page, then save.

  4. Check the resulting URLs

    Visit the root domain for Home and the Blog URL for the post list. If the physical /blog/ directory and the Blog page slug compete on your server, choose a different Posts-page slug such as articles, or adjust the rewrite configuration so the intended archive wins. The posts page and the homepage must be different pages.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The same controls may appear under Appearance → Customize → Homepage Settings on classic themes that expose the Customizer. Choose the static-page option, select Home and Blog, and publish the Customizer changes.

Understand what the Posts page actually does

The assigned Posts page is a special index. Its normal page body is generally ignored while the theme’s posts-index template renders the list of posts. This is why an empty Blog page is usually correct. Configure the archive’s appearance in the theme’s blog, archive, or query-loop settings, not by pasting ordinary page text into the assigned page.

Changing the page title or adding editorial copy does not automatically add that copy above the post list. If the theme supports an archive heading or a custom template, use that feature; otherwise the theme controls the output.

Check the theme template hierarchy before customizing code

Reading settings do not operate in isolation. The active theme’s files determine which template ultimately renders the front page.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

front-page.php takes priority

If a classic theme contains front-page.php, WordPress uses it for the site front page whether Reading settings select a static page or the latest posts option. That file must therefore implement the intended mode. A theme with a hard-coded front-page.php can appear to ignore your Home-page selection even though the Reading setting is correct.

Fallback templates when no front-page.php exists

Without front-page.php, WordPress follows the template hierarchy. Depending on the selected reading mode and the theme, it can fall through to home.php, page.php, or index.php. Check the active theme’s files before editing templates so you change the file that is actually used.

Keep the blog index separate from the front page

Do not name a static front-page template home.php when the theme also needs a separate blog or posts index. In classic themes, home.php is conventionally the posts index, and using it for the landing page can interfere with the Blog section. Use the static page setting and an appropriate front-page template instead.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Permalinks, media, and navigation checks

A successful homepage load does not prove that the migration is complete. The old directory can remain embedded in stored URLs and cached rewrite rules.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Permalinks: Save the existing structure again under Settings → Permalinks. Test a post, a page, a category, a tag, an author archive, a date archive if enabled, and a feed.
  • Media: Open several older uploads and inspect their image, attachment, and download URLs. Existing media references may still contain the former folder name and need updating in the database or content.
  • Menus: Follow every primary and footer navigation link. Custom menu items often retain absolute URLs from the old location.
  • Internal content: Search posts, pages, widgets, theme options, and plugin settings for the former site path. Update only URLs that should now be public; do not rewrite a server filesystem path into a browser URL.
  • Canonical and feed links: View source or use browser link inspection to ensure canonical URLs, RSS links, and pagination point to the root Site Address rather than the old installation path.
  • HTTPS and redirects: Test both the preferred HTTPS URL and any HTTP or old-path requests that should redirect. Avoid redirect loops caused by rules that send /blog/ to itself.

Recover access with configuration constants

If the URL change leaves the dashboard unreachable, temporarily define the canonical values in wp-config.php, which now resides in /blog/:

define( 'WP_HOME', 'https://example.com' );
define( 'WP_SITEURL', 'https://example.com/blog' );

WP_HOME overrides the database’s home value, and WP_SITEURL overrides its siteurl value. Use the exact public and core URLs, including https:// and no trailing slash.

These constants hard-code the settings and prevent editing those two fields from Settings → General while they remain defined. They are a recovery measure or an intentional deployment choice, not a substitute for moving files and fixing rewrites. Once access is restored, verify the database values and decide whether the constants should stay.

Troubleshoot by symptom

Symptom Likely cause Action
Homepage is a 404 No root loader, an incorrect bootstrap path, or a document-root mismatch. Confirm that the public root contains index.php, that it loads /blog/wp-blog-header.php, and that the domain points to the directory containing that file.
Dashboard redirects to the old folder Database URLs, hard-coded constants, or cached redirects still reference the former location. Check both URL settings, inspect wp-config.php, clear relevant caches, and use the temporary constants if necessary.
Posts and pages return 404 while the homepage works Rewrite rules were not regenerated or the server is reading the wrong rules file. Save the permalink structure again and verify the rules are applied in the public document root or the configured WordPress directory.
Images are broken only in older content Stored media URLs still contain the previous directory. Find and update those old URLs in content and settings, then retest representative uploads and thumbnails.
Blog page shows the wrong content The page is not assigned as Posts page, or a theme template is overriding the expected archive. Recheck Settings → Reading, inspect the theme’s front-page.php and home.php, and ensure Home and Blog are separate pages.
Redirect loop at /blog/ The physical core directory, Blog page slug, and server redirects are competing. Temporarily assign a different Posts-page slug, remove conflicting rules, and retest before deciding whether the archive should remain at /blog/.
Login works but styles or scripts do not Asset URLs, permissions, or cached paths still point to the old location. Inspect a failing asset URL, verify it uses the public Site Address, check file permissions, and purge caches after correcting the path.

Final verification checklist

Do not delete the old backup or remove rollback files until every item below works from a clean browser session:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • The root domain displays the intended Home page.
  • The Blog URL displays the posts index and is not the same page as Home.
  • Individual posts, pages, archives, feeds, search, and pagination load without unexpected redirects.
  • /wp-admin/ and /wp-login.php work at the new public address.
  • New and old media load over the correct HTTPS URLs.
  • Menus, widgets, forms, canonical links, and feeds no longer contain the former folder where they should not.
  • The active theme’s template hierarchy matches the desired front page and blog index.
  • No server rule redirects the physical /blog/ directory in a loop.
  • The database and file backups can still be restored.

What to retain for future maintenance

Document the final values of WordPress Address and Site Address, the location of the root loader, the selected permalink structure, the assigned Home and Blog pages, and any rewrite rules added at the server level. Future plugin, theme, or hosting changes can otherwise reintroduce the old path or replace the root entry point. Keep the distinction clear: the WordPress Address follows the core files, while the Site Address follows the public site.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.