.
Relocate macOS WeChat Chat History Location
Because WeChat chat logs take up a lot of hard disk space, for the system hard disk space is relatively small computer really can not afford to hurt, our own computer will also add an external disk, such as 2T mechanical hard disk or 1T SSD hard disk. However, WeChat chat history is not allowed to customize the location, but we can move it to a new location by opening the data and making a soft link.
For example, we all know that macOS system software data is generally stored in the ~/Library, but we have to be careful to find the next. For example, WeChat's chat history is there: ~/Library/Containers/com.tencent.xinWeChat/Data/Library/Application\ Support/com.tencent.xinWeChat/2.0b4.0.9
All we need to do is move the 2.0b4.0.9 folder to a location of our choosing and create a soft link back to it.
For example, I will have it present /Volumes/data/weixin/2.0b4.0.9
Here is my own operation record for reference
cd ~/Library/Containers/com.tencent.xinWeChat/Data/Library/Application\ Support/com.tencent.xinWeChat
mv 2.0b4.0.9 2.0b4.0.9 /Volumes/data/weixin/2.0b4.0.9
ln -s /Volumes/data/weixin/2.0b4.0.9 ~/Library/Containers/com.tencent.xinWeChat/Data/Library/Application\ Support/com.tencent. xinWeChat/2.0b4.0.9
sudo codesign --sign - --force --deep /Applications/WeChat.app
In this way, you can save the chat history of WeChat to other locations to avoid the lack of space on the system disk. One thing to remember is that if the software is updated, you need to re-sign it to make it effective.