WordPress.org

Ready to get started?Download WordPress

Forums

Install Duplicate WP site on a Sub-directory (15 posts)

  1. sirrens
    Member
    Posted 1 year ago #

    ok.. First
    I have a godaddy Linux Deluxe account, this allowed me to create
    multi site under one account. I have a primary website, then created 2 new domains under this primary.

    I called godaddy to ask them how to install wordpress on these two sub domains. They said "easy.." First lets backup your DB and word press files on the primary wp site. DONE!.. Now lets install WP into the two new domain sub folders.. DONE! Now lets just do a restore from the primary database into the 2 new sub databases. DONE! Now lets copy (via my ftp backup) the primary wp files in the new sub folders. DONE! Went to both new sub domain sites and BOOM! There they are prefect copies.. I said thank and hung up the phone with godaddy.

    Now granted, when I set these new installs of wp, I created new database names and password like I was told.. (I kinda had a feeling this would cause issues) but I want to follow her (Godaddy) steps. I mean I wanted the same site but need to just make small changes to the new domains.. Some text, picture and logo edits. So I needed separate admin logins (That I made during install)

    Well tried to login to the admin to the two new wp copy domains and WILL NOT Let me login to these admins.. I get errors, they try to redirect me to the primary login, etc...

    So I called godaddy, the said "OH, you need to edit afew of the php pages on those two new installs and something in the database tables on the new ones.. But we cant help you have a nice day.. EEEKKKE

    Can anyone help me here.. Im sure it has something to do with some changes to wp-config, admin folder and maybe the new database. So what I did was removed the installs and removed the folders.. now I'm back to start. I'm sure the first part was correct.. Install the WP app on the two new sub domains.. but that's when I need help.. copying over the wp folders and fixing the links to admin and user/password

    Thank you so much!!

  2. leejosepho
    Member
    Posted 1 year ago #

    I have only done this once and I am at a different server (BlueHost), but I have two sites that are virtually identical and yet completely separate...and I think that is what you are saying you want. After the first site was working (like you have now), I installed the second site as a sub-domain (by using SimpleScripts at the BlueHost Dashboard) into its own new folder inside my exiting public_html folder. Then when the SimpleScripts action had completed, it sent me an admin login for the second site and all was good-to-go.

    Hope that helps.

  3. sirrens
    Member
    Posted 1 year ago #

    Yeah.. Godaddy doesn't do it like that..
    I've created the 2 new sub domains and CAN install wordpress to them
    but seems when I want to copy database (restore function) and then copy (FTP) the file folders to the new sub domain site.. Remember, site are going to be almost the same with just small changes to reflect new sub domain names and some logos.. So I will need separate admin logins which it makes me create during the wordpress installs and database setups. but seems once I restore the data to get that copy.. the admin login all get screwed up. I need to know what I need to change after clones are done.. so I can have separate admin logins..

    I hope this makes sense
    Shane

  4. sirrens
    Member
    Posted 1 year ago #

    I know this has to be something with changing a file or database string maybe.. someone must understand whats needed here.. I'm starting to get desperate, "starting" lol.. I would imagine when I copying the original database and file folders.. Its not matching the new domain and admin info..

  5. michael.mariart
    Member
    Posted 1 year ago #

    You need to update the sites URL in the database. If you've just replicated the database to the new site(s), then the old URL is still in there so that's what WP will use to link to.

    You will need to use phpmyAdmin, or whatever DB tool your hosts provide, to update the values for 'siteurl' in the 'wp_options' tables on all of the additional databases. This will get you started.

    Another thing that you will need is to update all of the hard-coded links in your posts, widgets, etc on each new site. I use this tool for that, and it works very well when you follow the instructions.

  6. sirrens
    Member
    Posted 1 year ago #

    Ok, Ive started over..

    I have the new subdomain installed with wordpress and db..
    Now I need to start cloning over the main wp site to the new subdomian wp.

    Steps?
    Backup main wp database and file folders.. Done
    Restore main wp database to new subdomian wp database?
    Then login to the restore/new subdatabase and correct the site url, names, etc. (I printed the originals, so I know) in the wp_options.

    What about the wp admin login and password. Wont that copy over and now be the same? How do I keep them different?

    Also, is there a few wp files (.php) that will need edits?
    Then do I run the search and replace tool?

    thanks

  7. michael.mariart
    Member
    Posted 1 year ago #

    Close.

    1. Backup files and folders
    2. Backup database
    3. Add files to new sub-domain
    4. Create new database
    5. Import SQL file to new database
    6. Change DB connection settings in wp-config.php
    7. Run search & replace tool
    8. Log in as admin to change administrator accounts
    9. Edit any files that require it

    As you've said, yes the admin username and passwords will copy over as well, but that's expected when you do a copy like that. You need to log into each one and add/edit the admin user to be whatever you want that account to be for each site.

  8. sirrens
    Member
    Posted 1 year ago #

    ok.. cool
    at step 4. and 5.
    When I installed wp into the new sub-domain it created a new database that I named according to new domain. The import SQL file to the new database?
    What and how to I export the primary database from the master? The import that to new sub?

    I understand the wp-config.php ( I have a php editor, can I just move it local edit it and move it back via ftp?)

    the search and replace tool get dropped into the new sub-domain root, then I browser over to it in explorer/chrome. Will it run itself or do I have to tell it what to do?

    So sorry.. thanks for all your help

  9. michael.mariart
    Member
    Posted 1 year ago #

    The way that I've done SQL backups and restores before is using phpMyAdmin, which is built into most hosting control panels. You may have to create each database manually in your control panel, depending on which one you use.

    The search & replace tool works automatically, but you need to tell it what it needs to replace. As an example, you might want to change 'http://www.mysite.com' to 'http://site1.mysite.com'. Enter those values in when it asks you to, and it will do what it needs to.

  10. sirrens
    Member
    Posted 1 year ago #

    ok, just thought of this.. when I copy/move the files (WP.PHP folders and file) to the new sub domain wp directory.. Cant I just NOT replace the wp-config.php so I don't have fix it them?

    ok I logged into the phpMyAdmin found the primary database (Master) see a export button, it default to sql. but it shows two items in the box to export. information_schema and the database (it has a name like: mi273627382) at the buttom is a save as checkbox and default name like _SERVER_ and a "Go!" button

  11. michael.mariart
    Member
    Posted 1 year ago #

    Cant I just NOT replace the wp-config.php so I don't have fix it them?

    Yes. If it's set up now leave it that way.

    You should click into the database to export it. There should be a link for it on the left-hand side of the phpMyAdmin screen. use the export link after that, and it will export your databse without needing to worry about choosing much. Just stick with the default settings as this is how it's going to be imported again. You don't need to do anything with the information_schema database so don't export that one.

  12. sirrens
    Member
    Posted 1 year ago #

    hahah.. ok Im sorry..
    it did its sql data dump into what looks like a text box? Do I just copy that info and paste it into a document?

  13. sirrens
    Member
    Posted 1 year ago #

    nvm, If I just select the database and then it export it downloads it for me onto my computer! WOOT!

  14. alphaword
    Member
    Posted 1 year ago #

    Hi there,

    Don't know if you are still discussing these issues, but I have what I feel is a unique situation. I have a very simple one-page WordPress site which I wanted to drop into 2 other domain names for a client, then make simple changes to differentiate them. I copied all the files from the first site and dropped them into the other 2 domain names on the same server. The sites showed up fine, but I have a couple of issues.

    1. I had to add a couple of lines of code to the wp-config.php file so the login would take me to the correct site instead of the original one, which seems to work fine.

    2. I've renamed the root url for each new site correctly, but now when I make a change to one site, it also changes the other two sites, so now I can't differentiate the 3 sites from each other. Any ideas where this may be coming from?

    3. It would also be nice to have different passwords for each. Right now they are all identical.

    Any help would be appreciated.

  15. 2ninerniner2
    Member
    Posted 1 year ago #

    @alphaword -

    From what you mention, you did not create and populate the two new databases that need to go with the two new sites. All the sites are running off of the initial site's database :)

    Go through this thread again as it mentions how to create the new databases, export the initial one, import it into the new ones, edit the wp-config file with the new database info, and finally, edit the database with the new site's URL and home values.

    Cheers!
    Lyle

Topic Closed

This topic has been closed to new replies.

About this Topic