• Resolved runamuck

    (@runamuck)


    I will be moving files from one directory to another on the same server and have referred to this link: https://codex.www.ads-software.com/Moving_WordPress

    The first step instructs:
    “If you want to move WordPress to your root directory, make sure all index.php, .htaccess, and other files that might be copied over are backed up and/or moved, and that the root directory is ready for the new WordPress files.”

    Do I need to install a fresh new installation of WordPress if WordPress is already installed in that root directory to make it “ready” for the new WP files?

    Please advise. TIA!

Viewing 7 replies - 1 through 7 (of 7 total)
  • No, not if everything other than /wp-content/ and wp-config.php are default, but you might still need to take a look at something like .htaccess in both places to be certain you have what you need when you get there.

    back up all your file in zip and download it to your local computer and also your DB then upload the files in your server and extract the file and mention the db user name and password should be match in your wp-config.php.

    Thread Starter runamuck

    (@runamuck)

    okay…now I’m getting a little (okay, a lot) nervous. Can someone review my plan of action below and let me know that it’s correct?

    My situation:
    My redesigned site (new) is in a subdirectory (folder) of the primary domain name. (eg. https://www.primary.com/newsite).

    The site to be replaced (old) is in a subdomain of the primary domain name (shared hosting on same server). This is the root directory. (eg https://www.rootsite.com)

    My strategy:
    1 – back up “old” WP files and database. This is the existing site on the root directory.
    2 – Log into newsite and change WordPress and Site address to new location which should reflect the root directory.
    3 – Move WP core files to the new location via FTP.
    4 – done???

    I guess I’m not sure what to do with the existing site. Can I simply move the files to a subdomain labeled Archives?

    okay…now I’m getting a little (okay, a lot) nervous.

    Rule #1: Never panic;
    Rule #2: Always, always have a backup so you do not have to panic.

    My redesigned site (new) is in a subdirectory (folder) of the primary domain name. (eg. https://www.primary.com/newsite).

    The site to be replaced (old) is in…the root directory. (eg https://www.rootsite.com)

    Very typical.

    1 – back up “old” WP files and database.

    /wp-content/ folder and contents
    wp-config.php file
    SQL database export
    .htaccess (sometimes optional)

    2 – Log into newsite and change WordPress and Site address to new location which should reflect the root directory.
    3 – [Copy /wp-content/ folder and contents] to the new location via FTP.
    4 – done???

    No. The original wp-config.php for ‘https://www.rootsite.com’ must be edited to match the info for the new database, and you should be able to just leave that database right where it is and simply switch to it by editing wp-config.php. In my own case, I just first make certain the SQL user in wp-config.php has permissions for both databases.

    I guess I’m not sure what to do with the existing site.

    New or old?

    Thread Starter runamuck

    (@runamuck)

    wow. thanks so much. I just have to copy over wp-content to the root? Shouldn’t I copy over everything?

    Am I supposed to completely empty the root folder before putting new files in?

    There is no actual requirement to completely empty “root”, and that could even be a bad idea if you have any non-WordPress file there such as php.ini, for example, or anything else (such as possibly in .htaccess) that is server-related. But if you might want to freshen your core WordPress files and folders before making the move, take a look inside an un-zipped /wordpress/ folder and then delete from “root” all the folders and files your see in the /wordpress/ folder before uploading (do not merely overwrite) to “root” the content of the /wordpress/folder.
    note: wp-config.php is *not* in the un-zipped /wordpress/ folder so leave it alone in ‘root’.

    So yes, the only components actually needed during a site replacement are these:
    root/wp-content/ folder and contents
    root/wp-config.php file
    root/.htaccess (sometimes optional)
    SQL database import at cPanel phpMyAdmin

    Thread Starter runamuck

    (@runamuck)

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Moving WP files from one location to another’ is closed to new replies.