Closed
Labels
Description
Feature Request
- Yes, I reviewed the contribution guidelines.
Describe your use case and the problem you are facing
I am importing a site with almost 4GB of media and almost 10,000 posts and it takes longer than I'd like.
Describe the solution you'd like
Potential solutions:
- Check to see if file exists in
wp-content/uploads/already. If it does, use it instead of fetching it- To be fast this would need to be naive (matching only file name) and should probably only be enabled with an option
- As above, but using
--source-dir=or similar option - Allow attachements to be imported with
file://URLs.- Currently,
file://URLs result in errors like:Failed to import Media “media_name”: Request failed due to an error: A valid URL was not provided. (http_request_failed)<br />- The error remains when the
http_request_host_is_externalis updated to be__return_true
- The error remains when the
- Currently,
Reacted by possumbilities, Shafiya-Heena, shollich, Cable Green and Nate Angell
Reacted by Copilot
Activity
danielbachhuber commentedon Aug 21, 2023
Thanks for the suggestion, @TimidRobot !
This sounds like a great idea. We'd want to make it an opt-in behavior via flag or something similar. Here's another approach I've used in the past: https://danielbachhuber.com/two-wordpress-migration-performance-tips/
Feel free to submit a pull request, if you'd like. Here is some guidance on our pull request best practices.
TimidRobot commentedon Aug 21, 2023
@danielbachhuber thank you for the link!
The method we're currently using is:
wp-content/uploads/from source using rsynchttp_request_host_is_externalto be__return_trueto allow localhost URL during importThis seems to have largely removed the attachment portion of the import as a performance bottleneck for us. However it's a solution that is very specific, complex, and unattainable in a lot of hosting environments.