• ok I am totally new to this and a little confused. Please help.

    There is an existing site: let us say “sitename.com” in which an old version of WordPress is installed. This is the current publicly viewed site.

    I was asked to develop a new site and the hosting company (Register365) put in a new area “new.sitename.com”. The latest version of WordPress is installed here and this new site has now been completed to the delight of the owner. this “new.sitename.com” has a completely different WP-admin login page to the sitename.com and therefore different users.

    Now the time has come to replace the existing site with the new site. All that should be left when completed is one neat site and I don’t want a whole duplication of files. The new.sitename.com should effectively be deleted, as the sitename.com will now reflect all the new setup..

    In speaking with tech support at Register365, the host company, they state that the plugins will not work in helping me to move the site, but what I will need to do is copy all the files in the new wordpress directory over, export the new database and import this database using SQL. Then edit the PHP confiig file to ensure it points to the right database.

    At this point in time I have backed up files and exported databases from both new.sitename.com and sitename.com. Permalinks are set to their default while the new siteaddress URL and (new)wordpress URL reflect the new.sitename.com address.

    I have consulted the WordPress Codex and in particular “Moving Directories on Your Existing Server” and am still confused:

    Here there is no mention of the databases being exported and imported (guess this might be done within the plugins you talk of). However, it clearly highlights a need to change the WordPress URL and site address URL to the new address (sitename.com) and save these changes. My concern is given sitename.com already exists that this might cause issues.

    From what I understand this might be the best approach:

    1. Back up all files(using Filezilla) and export both databases (using PHPmyAdmin) at this stage, so that if necessary we can simply re-create the two existing sites as they stand.

    2. Delete the wordpress files and wordpress directories from the sitename.com directory

    3. login in to new.sitename .com and reset the SIte addresss URL and WordPress Address URL to sitename.com and save changes. Download this set of files by Filezilla.

    4. Using Filezilla, upload the wordpress files and directories taken from the last download in (3) to the sitename.com directory

    5. import the database taken from new.sitename.com into the sitename.com database.

    6. Ensure that the php Config file is directed to the imported database

    7. Go to sitename.com/wp-admin (or sitename.com/wp-login.php) to get into the backend of WordPress and correct the fixed links (including some custom menu items and other fixed links)

    8. Once happy with the working of the new site in sitename.com then new.sitename.com may be deleted.

    9. Recheck sitename.com for any broken links caused by 8.

    At this stage I would expect the logins would refer to users from the newsite.com

    Do I seem to have it nailed, at least in theory? Should I be exporting the database once the URL is changed in 3?

    If you can comment on this that would be most appreciated, this is by far and away the worst part of changing a site….

    Many thanks for your input on this.

    John

Viewing 5 replies - 1 through 5 (of 5 total)
  • the hosting company (Register365) put in a new area “new.sitename.com”.

    I would guess they added the /new/ folder as a nested installation inside the public “root” folder of whatever name (where sitename.com is installed) and that you might also be able to get there via sitename.com/new/.

    this “new.sitename.com” has a completely different WP-admin login page to the sitename.com and therefore different users.

    As you likely understand, that is because it has its own database.

    the host company…state that…I will need to…copy all the files in the new wordpress directory over

    You could, or just upload a fresh set of everything (other than the wp-content folder) from within an unzipped /wordpress’ folder, then add your own wp-content folder and wp-config.php.

    export the new database and import this database using SQL.

    Unless the two sites are on different servers, that should not be necessary if both are in the same hosting account. The database is at the server, and WordPress simply needs its wp-config.php info to access it. However, that new database currently only knows the URL you can presently see in the boxes at Dashboard > Settings > General, and that will have to be changed in both boxes in order for sitename.com to work after the new wp-config.php has been placed.

    Then edit the PHP confiig file to ensure it points to the right database.

    The wp-config.php file from the new site should work just as it is no matter where you place it.

    Overall: WordPress folders and files can be placed anywhere a domain will find them, then wp-config.php needs to know how to find the database, and then the database needs to know the URL.

    Thread Starter John RCR Grant

    (@john-rcr-grant)

    Thanks for this Lee Josepho.

    I am not so sure of the assumption of the adding /new/ on the end of the original site name – I just tried this and it does not work. Additionally in looking at databases stored under sitename.com and new.sitename.com they are completely different – here I am looking at the list of databases not just the ones being used.

    While I had asked the hosting company for a sub-directory to assemble this new site, in practical terms the new.sitename.com appears to be acting as a completely new domain name and that is how it appears in the CPanel.

    It seems to me that in taking the path that I propose I may be doing a bit of overkill potentially, but it should work fine. Is that a reasonable take on this?

    Thank you so much for your help and for your patience with this newbie.

    I will be speaking to the 365 team tomorrow to try and iron this out.

    Once again many thanks, your comments are really appreciated.
    John

    While I had asked the hosting company for a sub-directory to assemble this new site, in practical terms the new.sitename.com appears to be acting as a completely new domain name and that is how it appears in the CPanel.

    I have a primary domain and a few add-ons (but no sub-domains), and I readily admit to not knowing how all of that works even though I do know how to use cPanel to assign and/or redirect my domains to wherever I want them to land. The bottom line for you here is to simply know where sitename.com is assigned to land so you can put all-new wp-folders and wp-files.php plus your current new.sitename.com wp-config.php file in that location and run it *after* having told that new database the new URL to expect and to use.

    Additionally in looking at databases stored under sitename.com and new.sitename.com they are completely different – here I am looking at the list of databases not just the ones being used.

    cPanel > MySQL is where I can see all my database names and users, then cPanel > phpMyAdmin is where one of my users with full permissions for all databases can see all databases and their table_prefixes at once…and that is why there should be no need for you to do any database exporting/importing. If you can see a list of databases and both databases are visible there, your wp-config.php file will find its desired destination no matter where it is placed.

    It seems to me that in taking the path that I propose I may be doing a bit of overkill potentially, but it should work fine. Is that a reasonable take on this?

    I have only one eye that can read, and I have not studied your plan in detail. However, I had not seen anything there about changing the URL in the new database to make it work with wp-folders and wp-files in any place other than the new.sitename.com location, and doing a database export/import will not address that matter.

    Thread Starter John RCR Grant

    (@john-rcr-grant)

    Lee Josepho,

    Many thanks for your help on this. As you stated in your first entry, access to the (original new.sitename) database remained in place after moving all the WP files across to the new location in sitename.com.

    Having gone in and manually changed the hard-links all appears to be working fine, so thank you.

    The one thing that irks me is that that the importing of the databases failed, but that is for me to follow up with the Hosting Company. Kind of concerning for back-ups of database. For now the site now looks good.

    Cheers so much for your assistance and have a great day.

    John

    The one thing that irks me is that that the importing of the databases failed, but that is for me to follow up with the Hosting Company.

    Just a guess here, but someone might have been thinking of a content import at the Dashboard rather than realizing a database import has farther-reaching implications. And as to the matter of database backups, the deal there is be certain wp-config and the database name and table_prefix all match as they should and that the database already knows the path to/from the wp-config file. In my own case, I use phpMyAdmin > “Synchronize” to place a database (tables) clone in a separate database, and then in an emergency I can either just quickly change the database name and user in wp-config to use the clone or else export the tables from the clone and import them into the original database after having dropped its tables.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Moving developed site to replace existing site’ is closed to new replies.