Home Forums Front-end Issues How to migrate files from old site to new site?


How to migrate files from old site to new site?

  • Hi

    I have two fields on my old site, a file upload field and a text field and I am migrating it to a new site. Now I have migrated everything except the files uploaded to the file upload field and to the text field.

    I tried the export / import WordPress tools with no luck and the export function on ACF settings (this actually just exports the fields, not the files.). I usually do everything using the Duplicator plugin but this time, I’m using a multisite so Duplicator wouldn’t work (for free).

    Is there any way I can migrate the files?

  • Hello,

    the best option should be to migrate your site by uploading all the files of wp on your ftp, changing the database connexion on wp-config.php and then change urls in you phpmyadmin like this :
    select your db
    click on sql tab
    add this script and change what’s needed :
    UPDATE wp_options SET option_value = replace(option_value, ‘http://www.oldurl’, ‘http://www.newurl’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;

    UPDATE wp_posts SET guid = replace(guid, ‘http://www.oldurl’,’http://www.newurl’);

    UPDATE wp_posts SET post_content = replace(post_content, ‘http://www.oldurl’, ‘http://www.newurl’);

    UPDATE wp_postmeta SET meta_value = replace(meta_value,’http://www.oldurl’,’http://www.newurl’);

  • When it comes to migrating a site, these are the steps that I take.

    1. Download all the files on the site
    2. Export the database (using phpMyAdmin)
    3. Upload the files to the new site
    4. Import to the new database (phpMyAdmin)
    5. Modify wp-config.php to point to the new database
    6. If needed use this tool to do DB modification if the domain name needs to be changed

    If you are looking to migrate only a single post type and the images associated with the acf fields of this post type, there isn’t a way to do this easily, it could be impossible.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘How to migrate files from old site to new site?’ is closed to new replies.