Notifications
Clear all

Problem with attachment files

5 Posts
2 Users
1 Reactions
1,548 Views
Posts: 83
Topic starter
(@mondesensuel)
Trusted Member
Joined: 8 years ago

Hello !

I just migrate the forum, and copy past the attachment too.

I have a problem.
The attachments are in media gallery ( dashboard > Media > forum Attachment ),  but not in personnal windows attachment.

Why ?

4 Replies
Posts: 83
Topic starter
(@mondesensuel)
Trusted Member
Joined: 8 years ago

The problem is for old attachments files, not for new.
New files are fine.

Reply
Posts: 83
Topic starter
(@mondesensuel)
Trusted Member
Joined: 8 years ago

I found the problem, but I need a fastest solution for repair it.

In SQL Table, the table "wp_wpforo_attachments"

I need to change the name of "fileurl" 

The last name was
fileurl = //domaine1/wp-content/uploads/wpforo/attachments/nomdufichier

And I need to be :
fileurl = //domaine2/wp-content/uploads/wpforo/attachments/nomdufichier

Do you know a sql request for change name of 5000 files faster ? and not 1 by 1 ?

Thank you !

Reply
Posts: 4213
 Tom
Admin
(@tomson)
Famed Member
Joined: 10 years ago

Just backup this table and execute this SQL in the database > SQL tab. Make sure wp_ prefix matchs to your table prefix and change the "olddomain.com" and "newdomain.com" to your original domains:

UPDATE `wp_wpforo_attachments` SET `fileurl` = REPLACE( `fileurl`, '//olddomain.com/', '//newdomain.com/' );
wpForo advanced attachments urls change new domain
Reply
Posts: 83
Topic starter
(@mondesensuel)
Trusted Member
Joined: 8 years ago

Thank you very much, I will try it soon. 

Reply
Share:
Scroll to top