How to Change Your WordPress Blog Post Directory
Moving your WordPress blog posts to a subdirectory like /blog/ is a strategic move to separate your dynamic content from static pages, improving site structure and user experience.
This article will explain to you how to achieve putting all your blog articles under a different directory.
Method 1: The Native WordPress Approach (Recommended)
The simplest and most effective way to achieve this is by adjusting your WordPress Permalink Structure. This method requires no coding and works instantly for standard blog posts.
Step-by-Step Implementation
- Log in to your WordPress dashboard and navigate to Settings > Permalinks.
- Choose the Custom Structure radio button.
- Enter /blog/%postname%/ in the input field.
- This structure ensures your posts appear as your-site.com/blog/your-article-title.
- Crucially, Pages (like “About Us” or “Contact“) will remain at the root domain (e.g., your-site.com/contact), unaffected by this change.
- Click the Save Changes button at the bottom of the page. WordPress will automatically flush your sites’ rewrite rules.
Important Considerations for Existing Sites
If your WordPress site already has published posts, changing the URL structure will break existing links unless you handle the transition correctly.
- Changing permalinks can negatively impact your search engine rankings if old URLs return 404 errors. Search engines view broken links as a sign of poor site maintenance.
- You must set up 301 Permanent Redirects from the old URLs (e.g., your-site.com/old-post) to the new ones (your-site.com/blog/old-post).
- While WordPress handles some internal rewriting, using a plugin like Permalink Manager or a dedicated redirection plugin is highly recommended to automatically catch old links and forward them, preserving your SEO equity.
Method 2: Handling Custom Post Types (CPTs)
If your site uses Custom Post Types (CPTs) (e.g., “Projects,” “Case Studies,” or “Products“) and you do not want them to inherit the /blog/ prefix, the global setting above will affect them too.
To exclude specific post types from the /blog/ directory:
- You need to access the code where the Custom Post Type is registered (usually in your theme’s functions.php file or a custom plugin).
- Add the rewrite argument with ‘with_front’ => false. This tells WordPress to ignore the global /blog/ prefix for this specific content type.
Code Example:
register_post_type(‘project’, array(
‘label’ => ‘Projects’,
‘public’ => true,
‘rewrite’ => array(
‘slug’ => ‘projects’, //Keeps URL as your-site.com/projects/name
‘with_front’ => false //Ignores the global /blog/ setting
),
// … other arguments
));
After adding this code, visit Settings > Permalinks and click the Save Changes button again to refresh your sites’ rewrite rules.
Summary Checklist
- Backup your database before changing URL structures.
- Set custom structure to /blog/%postname%/
- Ensure static pages are accessible at the root domain.
- Install a redirection plugin to map old post URLs to the new /blog/ URLs to prevent 404 errors.
- Check menus and internal content to ensure they point to the new URLs.
- Resubmit your XML sitemap to Google Search Console to expedite re-indexing.
By following these steps, you can cleanly separate your blog content while maintaining the integrity of your main site architecture.
Conclusion
I hope my article covering how to relocate your WordPress Blog Articles to a different directory has been helpful to you. I welcome your thoughts, questions or suggestions regarding this article.
You may support my work and future improvements by sending me a tip using your Brave browser or by sending me a one time donation using your credit card.
Let me know if you found any errors within my article or if I may further assist you by answering any additional questions you may have.




