Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
FREEDOM251

Freedom251 › Blog › Blog Setup

How to Move WordPress to a /blog Folder and Keep a Custom Front Page

By Freedom251 Team · · 9 min read

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

To keep a public homepage at https://example.com/ while WordPress runs from https://example.com/blog/, set the two WordPress URL fields deliberately, move the files only after saving those values, place the root loader where visitors can reach it, refresh permalinks, and then assign separate Home and Blog pages in Reading settings.

This arrangement separates the location of WordPress core files from the address visitors use. Done in the order below—with a restorable database and file backup—it does not require reinstalling WordPress.

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 creating

WordPress stores two different addresses in Settings → General. They are related, but they answer different questions:

Setting or location Value in this example What it controls
WordPress Address (URL) https://example.com/blog The directory containing core files such as wp-config.php, wp-admin, wp-content, and wp-includes.
Site Address (URL) https://example.com The public address people type to reach the site and its homepage.
Public root https://example.com/ Serves the front-page entry point while core remains in /blog.
Posts index https://example.com/blog/ in the usual setup Displays the post archive when the Blog page is assigned as the Posts page.

Enter both values with the https:// scheme and without a trailing slash. WordPress trims a trailing slash, but using the canonical form avoids confusion while you are moving files.

Before changing anything

A URL move changes database values, filesystem locations, rewrite rules, and potentially thousands of stored media links. Make a backup that you can restore before touching either URL field.

Back up every part of the site

  • Export a complete copy of the WordPress database.
  • Copy the entire current WordPress directory, including wp-admin, wp-content, wp-includes, wp-config.php, themes, plugins, and uploads.
  • Preserve any non-WordPress files in the public root, such as existing verification files or server configuration.
  • Record the current permalink structure and any custom rewrite rules so you can compare them after the move.
  • Confirm that you can access the backup independently of the server being migrated.

A backup or migration tool can automate copies, but it is only useful if the resulting archive includes both the database and uploaded files and has been tested enough to restore.

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

Confirm the destination

  • Make sure /blog is available as the destination directory and is not already serving another application.
  • Make sure the public root can contain an entry-point index.php (or the equivalent server entry file) that loads WordPress from /blog.
  • Check that your hosting account permits the web server to read the new directory and that existing root rules will not redirect every request into a different application.
  • Schedule the change for a short maintenance window. Visitors must not load the site between saving the new URL values and completing the file move.

Change the two URL settings

Perform this step while the files are still in their original location.

  1. Sign in to the WordPress dashboard.
  2. Open Settings → General.
  3. Set WordPress Address (URL) to https://example.com/blog.
  4. Set Site Address (URL) to https://example.com.
  5. Check that both values use the correct domain, use https://, and have no final slash.
  6. Save the settings once.

After saving, WordPress begins generating links from the new addresses even though the files have not moved yet. Do not open the public site, refresh an old page, or browse to the dashboard during this brief interval.

Move the files and keep the homepage at the root

  1. Move the WordPress core files and directories into the new /blog directory. The move should include the existing wp-admin, wp-content, wp-includes, wp-config.php, and the current root index.php.
  2. Place an index.php entry point in the public root. It must load WordPress’s bootstrap from the new /blog directory; the root file is a loader, not a second WordPress installation.
  3. Leave the WordPress core copy in /blog. Do not create a second wp-content or install another set of core files in the root.
  4. Check file and directory permissions against the values your host requires, then open the administrative login at the public address. Depending on the server and rewrite rules, the login may be reached through /wp-admin or /wp-login.php.

The public root loader is what allows https://example.com/ to display WordPress while the application itself lives under https://example.com/blog/. Requests for administrative files and other core resources use the WordPress Address and therefore resolve under /blog.

Regenerate permalinks immediately

  1. In the dashboard, open Settings → Permalinks.
  2. Review the selected structure without changing it unless a change is intentional.
  3. Click Save Changes. Saving again regenerates rewrite rules in the directory containing the active WordPress entry point.
  4. Open a sample page, a category or tag archive, an individual post, and the feed to verify that each returns the expected content rather than a 404 or redirect loop.

Permalink regeneration is necessary even when the visible structure has not changed. Moving the files changes where the server must apply the rewrite rules.

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

Create a custom homepage and a separate blog index

Create the two pages

  1. Go to Pages → Add New, create a page named Home, add the front-page content, and publish it.
  2. Create a second page named Blog. It can normally remain empty because WordPress will use it as an index rather than render its ordinary page content. Publish it.

Home and Blog must be different pages. The page assigned as the Posts page is a special archive target; the theme’s posts-index template supplies the list of posts, so adding a normal page layout or post loop to that page is not how the archive is built.

Assign them in Reading settings

  1. Open Settings → Reading.
  2. For Your homepage displays, select A static page.
  3. Set Homepage to Home.
  4. Set Posts page to Blog.
  5. Save the changes.

The resulting URLs depend on your permalink structure. In the common arrangement, the root URL displays Home and /blog/ displays the post index, while individual posts use the site’s chosen permalink pattern.

Use the Customizer when the theme exposes it

Some classic themes provide the same controls at Appearance → Customize → Homepage Settings. Select A static page, choose Home as the homepage, optionally select Blog as the Posts page, and click Publish. If that panel is absent, use Settings → Reading instead.

Check how the active theme chooses templates

Reading settings do not operate in isolation from the theme’s template hierarchy.

Free tools Windows power users keep installed

One-click scans. No signup required.

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

When front-page.php exists

If a classic theme contains front-page.php, WordPress uses that file for the site front page whether Reading settings are set to a static page or to the latest posts. The file must therefore implement the intended front-page mode. A theme can appear to ignore your Home-page selection when its front-page.php assumes a different design.

When front-page.php does not exist

WordPress falls through the hierarchy to the appropriate home.php, page.php, or index.php template. The exact file depends on whether the front page is configured as a static page and how the theme is built.

Keep the blog template separate

Do not name a static front-page template home.php when the theme needs a separate posts index. In WordPress’s hierarchy, home.php is associated with the posts index, so using it for the static homepage can make the Blog section render incorrectly or appear to be ignored.

Test the finished migration

Use a private browser window or a second device so cached redirects do not hide problems.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Test Expected result If it fails
Root URL https://example.com/ displays the published Home page. Check the Reading assignment, root loader, and any front-page.php.
Blog URL The assigned Posts page displays the post archive. Confirm Blog is selected as Posts page and that the theme’s posts-index template is available.
Individual post The chosen permalink resolves without a 404. Save Settings → Permalinks again and inspect rewrite rules.
Dashboard and login Administrative URLs load under the new core location. Check the two URL values, constants in wp-config.php, and server redirects.
Media library and images Existing uploads display and links point to the intended location. Search stored content for the former directory and update stale media URLs.
Navigation Menus and internal links lead to the root homepage, Blog, and posts. Edit links that still contain the old directory or old domain.
Feeds Site and post feeds open at their expected URLs. Check rewrite rules and feed-related theme or plugin settings.

Old media URLs and navigation links can survive the move because they are stored in post content, widget settings, menus, or plugin data. The file move itself does not rewrite every stored string.

Recover access if the URL change locks you out

If the dashboard becomes unreachable immediately after the change, temporarily hard-code the intended values in wp-config.php:

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

Place these definitions before the line in wp-config.php that says WordPress has stopped editing. Use the exact public and core URLs, including https:// and no trailing slash.

WP_HOME overrides the database’s home value, and WP_SITEURL overrides siteurl. Because the constants hard-code the addresses, the corresponding fields are no longer editable from General Settings while the definitions remain in place.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Teacher Record Book
  • Keep track of everything from attendance to test scores
  • Spiral bound
  • Measures 8-1/2" x 11"

After access is restored

  1. Confirm that the files really are in /blog and that the root loader points there.
  2. Check for a typo, missing scheme, or trailing slash in either constant.
  3. Clear any server or browser cache that is preserving an old redirect.
  4. Once the database values are correct and stable, remove the temporary constants if you want to manage URLs from the dashboard again.
  5. Save Settings → Permalinks and repeat the public tests.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common failure modes and targeted fixes

“Error establishing a database connection” or a blank page

Moving directories should not alter database credentials. Verify that wp-config.php moved with the installation and that the root loader is invoking the copy in /blog, not a missing or duplicate installation.

A redirect loop between the root and /blog

Compare the WordPress Address and Site Address values character for character. The core address should end in /blog; the public address should be the domain root. Remove conflicting server redirects and temporary constants that disagree with those values.

The homepage shows posts instead of Home

Check Settings → Reading first. If Home is selected but the result is unchanged, inspect the active theme for front-page.php; that template takes priority for the front page and may be coded to show the latest posts.

The Blog page is blank or shows its editor text

Verify that Blog is selected as the Posts page and that Home and Blog are separate pages. The archive is rendered by the theme’s posts-index template; content entered into the Blog page itself is generally ignored.

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

Posts and pages return 404 errors after the move

Save Settings → Permalinks again. If the problem persists, check that rewrite rules are permitted in /blog, that the root loader is in the public root, and that another application is not intercepting requests.

Images are broken but pages load

Inspect the image URL in the page source or Media Library. Existing content may still contain the former directory. Update those stored URLs carefully, preserving the actual upload paths and making a database backup before any bulk replacement.

Choose the architecture before you migrate

The root-homepage design is not the only possible layout. Decide which public URL model matches your navigation, search indexing, and maintenance requirements before changing files.

Architecture Core files Public homepage Posts index Main trade-off
Root homepage with a /blog section /blog https://example.com/ Usually https://example.com/blog/ Provides a distinct marketing or landing homepage while keeping posts grouped under /blog; requires a root loader and careful URL testing.
Public site also under /blog /blog https://example.com/blog/ Often the same public section or another assigned page Simpler file-to-URL relationship, but the main site address includes the directory.
Everything in the public root Public root https://example.com/ Defined by Reading settings and permalinks Avoids a subdirectory move, but does not meet the requirement that core files live in /blog.

Whichever model you select, keep one authoritative WordPress installation, one set of URL values, and one tested backup. Changing the architecture later repeats the same risks around rewrites, stored links, and theme behavior.

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

Quick Recap

SaleBestseller No. 1
SaleBestseller No. 3
Bestseller No. 4
Teacher Record Book
Teacher Record Book
Keep track of everything from attendance to test scores; Spiral bound; Measures 8-1/2" x 11"
$4.89

Final verification checklist

  • The database and all WordPress files have restorable backups.
  • WordPress Address is the core directory URL and Site Address is the public URL.
  • Both URL values use https:// and omit a trailing slash.
  • Core files are in /blog, and the public root loader reaches that installation.
  • The login, homepage, Blog archive, posts, pages, media, feeds, and menus have been opened after the move.
  • Permalinks were saved again after the files moved.
  • Home and Blog are separate published pages, with Blog assigned as the Posts page.
  • The active theme’s front-page.php and home.php behavior matches the intended design.
  • Temporary WP_HOME and WP_SITEURL constants are either correct or removed after recovery.
  • Stored media and navigation links no longer point to the former directory when they should not.

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.

Blog Setupcustom homepagePermalinkswebsite administrationWordPressWordPress migration

Leave a Reply

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

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.

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.