WP problem with upload path after moving site

Hi all.

I’ve looked for hours for an answer to my dilemma. I hope someone can help.

I’ve moved a site from a subdomain on my site to the main domain on another site (different host). I’ve changed the upload path, but I’m getting this error when trying to upload a photo:

Warning: touch() [function.touch]: Unable to create file /home/matilda2/public_html/fruitaddicts/wp-content/uploads/Heather.tmp because No such file or directory in /home/fruitadd/public_html/wp-admin/includes/file.php on line 177

“Heather.jpg” has failed to upload due to an error
The uploaded file could not be moved to /home/fruitadd/public_html/wp-content/uploads.

The path with matilda2 in it is the old path and I can’t find where or how to change this. Downloaded my SQL file and did a search in Text Edit for ‘matilda2’ and nothing.

Any ideas? Help would be much appreciated.

I know you say you have changed the upload path, but have you actually changed the website / wordpress directory path in general settings?

Yes, the WordPress Address (URL) and the Site Address (URL) in General Settings have been changed to the new URL.

OK, you say you have searched the sql download, but have you searched all the site files as well?

Just did it that and it was in wp-config.php! Can’t believe I missed that, but I hadn’t seen that defined in wp-config before so I didn’t think to look there.

It was:

define(‘WP_TEMP_DIR’, ‘/home/matilda2/public_html/fruitaddicts/wp-content/uploads’);

Changed to new path and all working now. Thank you so much!!!

No problem, glad I could help.

To be honest, I think the wp-config should have updated automatically when you changed the main site paths in the general settings without you having to do anything.

Yeah, I thought it was a bit strange. Hadn’t happened before.

Definitely using sitepoint again (tried WP support forums and no help after 2 days!).