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 Reply To: Permalinks on moved installation

Discussion in 'Misc WordPress Requests' started by Xenos (xkon) Konstantinos, Mar 5, 2018.

  1. Xenos (xkon) Konstantinos


    Reply To: Permalinks on moved installation, by Xenos (xkon) Konstantinos

    Let’s create an example so we’re sure we’re on the same page here as I got lost a bit on your steps of the subdirectory installation.

    main url is http://localhost and WordPress is located inside /wp folder.

    Your siteurl (wordpress) should be http://localhost/wp and the home (website) should be http://localhost. You should copy the .htaccess and index.php page in the root ( basically http://localhost) directory and edit the index.php changing the line:

    require( dirname( __FILE__ ) . '/wp-blog-header.php' );
    require( dirname( __FILE__ ) . '/wp/wp-blog-header.php' );

    The only thing left would be to just go to permalinks and hit save again so WordPress can read the appropriate pretty urls.

    An extra note sometimes after moving WordPress you still have to do a manual search and replace to convert old urls to new ones if it was a migration. A plugin as https://wordpress.org/plugins/better-search-replace/ could easily do the job. Some themes + plugins are unfortunately hardcoding their urls when they create their options instead of using the core functions to retrieve it.

    Reply To: Permalinks on moved installation

Share This Page

Monarch Social Sharing Plugin