• Resolved klynam

    (@klynam)


    I currently have a WP site running from a subdirectory of my root domain:

    clientsite.com/cms/

    Everything works fine, using the “give WordPress its own directory” instructions, and all pages in the site site correctly resolve to the root domain, without requiring /cms/ in the URL construct.

    To develop a new website for the client, I’ve cloned the existing site into another subdirectory installation like this:

    clientsite.com/cms2/

    I can access the WP admin backend of the new subdirecotry installation here:

    clientsite.com/cms2/wp-admin/

    But that is the ONLY URL construct which is honored into the /cms2/ subdirectory installation.

    When I try to go to ANY OTHER page of the website, I receive a 404 missing page error, or I’m sent to the corresponding page of the original website.

    so if I enter this: clientsite.com/

      cms2

    /pageid

    I’m taken here: clientsite.com/pageid

    I understand this is because of the change I made to the index.php file in my root directory, with this declaration:

    /** Loads the WordPress Environment and Template */
    require( dirname( __FILE__ ) . '/cms/wp-blog-header.php' );

    However…

    I’ve worked this way for years in WP, and don’t remember this being an issue before. If I wanted to get to a subdirectory page I just included the correct subdirectory in the URL and the page resolved, whether in the backend admin or the front end website.

    However, I haven’t redesigned a website like this within the past year or so, and I don’t recall ever doing it with a GoDaddy hosted site. So maybe something changed in WordPress, or perhaps there’s something going on w/ GoDaddy hosting specifically?

    The client doesn’t want to migrate to GD’s Dedicated WordPress hosting, which would provide the ability to setup a staging website.

    I appreciate any advice…

    • This topic was modified 6 years, 5 months ago by klynam.
    • This topic was modified 6 years, 5 months ago by klynam.
    • This topic was modified 6 years, 5 months ago by klynam.
    • This topic was modified 6 years, 5 months ago by klynam.
    • This topic was modified 6 years, 5 months ago by klynam.
    • This topic was modified 6 years, 5 months ago by klynam.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter klynam

    (@klynam)

    For instance, is there a way to create a NO-REWRITE sort of rule, so that a specified URL construct is always honored and not rewritten to the default sub-directory?

    You say you copied everything from the old site to the new.

    I’m wondering if the new site is talking to the old site’s database?

    Quick way to figure out is to look at the site settings from the new site’s admin dashboard. If they match the old site’s URL then you know that’s the problem and you can’t fix that from where you are at as ‘Admin’ most likely refreshed when you changed to ‘Settings’ to use the original site’s address so don’t try that. The cookies are the same so the session would have tolerated that change.

    Or you can create a new test post from the new sites admin. If it shows up in the original site then you have a problem with using the wrong database or database tables.

    Watch the browser bar. That will tell you and of course, the credentials for the new site’s wp-config should be very different in the database section or at least show a second different table prefix.

    If you’d done a fresh install you’d have a new database or created the new prefix. Copying everything over didn’t create a new database… but a new database would have required copying the database or it’s content over, too.

    Thread Starter klynam

    (@klynam)

    OMG… you’re brilliant – LOL

    Of course the site settings were CLONED from the old site. One text change to include the correct sub-directory and I’m off to the races.

    Thank you so much @jnashhawkins !!!

    • This reply was modified 6 years, 5 months ago by klynam.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to run 2 subdirectory installations?’ is closed to new replies.