Helping you Build Your Own Social Network!

Faster, better and easier!

Migrating Avatars

(3 posts) (3 voices)
  • Started 2 years ago by Symm2112
  • Latest reply from TradingMetro.com

Tags:

No tags yet.


  1. Can anyone tell me where in the database avatar files are linked to the user? I'm migrating my wordpress standalone site to wpmu/bp and have looked everywhere but can't find out where to relink their avatars. I was able to convert all of my users to wpmu and have access to my old sites wp-content/uploads/avatars folder but don't know if I put all of those files in blogs.dir/1/files if they'll relink or what to do in relation for buddypress. I'd love to have all of my users already have their avatars in their profile when they join after we relaunch the site. I've looked in the usermeta table and everywhere else but just can't find out where to do it.

    Thanks for any help.

    Posted 2 years ago #
  2. hi Chris
    I don't see a way to do that. May be if you can tell me the structure of your old avatars, I can have suggestions.
    the problem is buddypress does not stores the link to avatar file in the database.

    It is stored, say for user avatars here
    For Wpmu it goes like,
    wp-content/blogs.dir/BP_ROOT_BLOG/files/avatars/user_id/
    hashed file name(with -bpfull/bpthumb) suffix.

    So, The avatars are fetched based on their location not linked via database(BP_ROOT_BLOG is the id of the blog where BP is active and user_id is the id of user whose avatar is stored).

    yes, if you follow this structure and move the user avatars to something like
    wp-content/blogs.dir/BP_ROOT_BLOG/files/avatars/user_id/ [you will have to know which user the avatar was linked earlier).
    and create two images, one with suffix bpthumb and one with bpfull [ex. abcdgdgdgd36546546-bpfull.jpg], hopefully It should work, as buddypress does not checks for the full name of file, rather it relays on location of file+suffix of file.

    Thanks
    Brajesh

    Posted 2 years ago #
  3. Thanks for posting this, Brajesh.

    Was trying to figure this out as well, but for group avatars.

    Renaming the suffix worked!

    Thanks again!

    Posted 2 years ago #

Reply

You must log in to post.