Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Tilde in WP_HOME Throws 404 When Saving Post

Discussion in 'Misc WordPress Requests' started by jeffpurcell, Nov 14, 2017.

  1. jeffpurcell


    Tilde in WP_HOME Throws 404 When Saving Post, by jeffpurcell

    When developing a new WordPress website, we use the temporary cPanel URL. Something that resembles this:

    We do this so we can develop inside the same cPanel account and quickly launch the site by changing the WP_SITEURL and WP_HOME and running a quick search and replace in the db.

    My issue comes when saving a post, page or any cpt. After saving or publishing the new url after saving looks like this:

    It is missing the ~username portion of the url.

    I’ve even defined the WP_HOME and WP_SITEURL constants to include the full path:

    From poking around on other forums I’m beginning to think this may be a url sanitizing function.

    Any one have a thought on how to avoid this?

    The post saves just fine, but it is quite annoying to have to edit the url after every save.

    Tilde in WP_HOME Throws 404 When Saving Post

Share This Page

Monarch Social Sharing Plugin