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:
Go to Settings -> Permalinks;
Under Common Settings, choose Custom Structure. The default structure there would be http://yourdomain.com
In front of
/blog, so it will become http://yourdomain.com
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: