How to Add /blog/ in Front of Your WordPress Posts URLs

Before starting the steps, I recommend taking the database backup so that if anything goes wrong then you have everything in your hands. It always worked fine for me but you never know if something goes wrong.

So I hope you have done with the database backup so lets start with the process of how to add /blog/ in Front of Your WordPress Posts URLs.

Follow these simple steps:

Step 1

Go to Settings -> Permalinks;

Step 2

Under Common Settings, choose Custom Structure. The default structure there would be http://yourdomain.com/%postname%/;

Step 3

In front of /%postname%/, add /blog, so it will become http://yourdomain.com/blog/%postname%/;

Step 4

Save changes.

All Done 🙂

Note: Make sure your .htaccess file at root has write permission so that rewrite rules will get updated otherwise screen will ask you to add the updated code to your .htaccess file.

Issues you may face once you add /blog/ in Front of Your WordPress Posts URLs

After making changes to the permalink structure, you may notice that if you have created a custom post type then /blog/ will also be added to the slug of posts under that custom post type.

How to resolve this?

Just choose false for “With Front” of that post type to resolve the issue of /blog/ added to the slog of your custom post type posts too. Check the reference screenshot below: