Copy Directories / Sub Directories / Files from FTP / PHP

UpdraftPlus Home Forums Paid support forum – UpdraftPlus backup plugin Copy Directories / Sub Directories / Files from FTP / PHP

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #18098
    KK
    Participant

    Hi David,

    I have to move a site from one directory to another, and I only have ftp access to site.

    Can you please give me php script which I can specify the folder source path and destination path so wordpress is copied there and then run the updraft migrator on it.

    Or is there any better way to do?

    Note: I am not moving files because I got issue with one of the sites when I moved it and the site screwed up and took lot longer to fix.

    Looking forward to hear from you.

    Thanks

    #18841
    udadmin
    Keymaster

    Hi Karim,

    When you say that you only have FTP access, do you mean that you don’t have a WP admin login?

    Best wishes,
    David

    #18843
    KK
    Participant

    Hi David,

    Thank you for getting back to me.

    I have wp admin details and ftp access only.

    I want to move wordpress site from a sub-directory (mydomain.com/wordpress) to root (mydomain.com)

    I can not install wordpress as I don’t have access to mysql databases and or cpanel.

    What is the best way to move the wordpress site from sub-directory to root in this scenario?

    Looking forward to hear from you.

    Thanks

    #18844
    udadmin
    Keymaster

    Hi Karim,

    If you have FTP access, then you can read MySQL details out of wp-config.php. Thus, you do have access to MySQL (and can use FTP to install something like adminer to manage it). You just need to install WordPress with a different table prefix than the existing site.

    Alternatively, just:
    1) Move the files up a level
    2) Edit wp-config.php by adding:
    define(‘WP_SITEURL’, ‘http://mydomain.com’);
    define(‘WP_HOME’, ‘http://mydomain.com’);
    3) Log in, and go to UpdraftPlus – and in the expert tab, search/replace http://mydomain.com/wordpress with http://mydomain.com
    4) Remove the defines from step 2)
    Best wishes,
    David

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Copy Directories / Sub Directories / Files from FTP / PHP’ is closed to new replies.