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.
- Download all the files on the site
- Export the database (using phpMyAdmin)
- Upload the files to the new site
- Import to the new database (phpMyAdmin)
- Modify wp-config.php to point to the new database
- If needed use this tool to do DB modification if the domain name needs to be changed https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
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.