According to the docs: https://codex.wordpress.org/Using_Permalinks
Go to settings -> permalinks -> custom structure
and change that to: /blog/%postname%/
But please make sure that in your custom post types definition, (register_post_type
) set
'rewrite' => array( 'with_front' => false ),
unless the URL of all of your custom post types will be prefixed by /blog/
UPDATE:
As @rudtek mentioned in the comment, after your set 'with_front' => false
, you must go to settings->permalinks and hit save again to flush rewrite rules. (This is the solution for many permalink issues)