Could not create destination file error

Created on 31 May 2017, over 7 years ago
Updated 24 September 2023, about 1 year ago

Ran into this issue on a shared hosting provider where the system wide temporary directory is not writeable. I didn't look into the dev version, maybe this is already fixed.

For a reason that is unclear to me on line 238 within wordpress_migrate.migrate.inc the code attempts to create a temporary file with usage of sys_get_temp_dir() but in my case on a shared hosting environment this returns a directory that is not writeable:

$tmpfile = tempnam(sys_get_temp_dir(), 'wp_');

Replaced it to work with the temporary directory according to drupal settings:

$tmpfile = tempnam(file_directory_temp(), 'wp_');

Steps to reproduce:
Content --> Migrate --> Migrate from Wordpress --> Enter URL / Login credentials --> Import --> Error Message "Could not create destination file".

πŸ› Bug report
Status

Closed: outdated

Version

2.3

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024