[2014-08-05 18:01] │ entry #1198

运行在SAE上的WordPress修改Storage地址的方法

2014 年 8 月 5 日 │ WordPress │ 0 评论 │ 阅读 0

找到wp-includes/functions.php在大约第1714行找到

1 $url = 'http://' . $_SERVER['HTTP_APPNAME'] . '-'.SAE_STORAGE.'.stor.sinaapp.com'.SAE_DIR;

将‘.stor.sinaapp.com’替换为‘.stor.vipsinaapp.com’
保存,覆盖。
只是这样子还不行,原来的图片还是使用*.stor.sinaapp.com的地址,我们需要进去PHPMYADMIN,执行

1 UPDATE wp_posts SET post_content = replace(post_content, 'http://***.stor.sinaapp.com','http://***.stor.vipsinaapp.com')

其中:’http://***.stor.sinaapp.com’替换成你原来的Storage地址,’http://***.stor.vipsinaapp.com’替换成现在的Storage地址。
然后看看自己主题以及插件中是否调用了原来的Storage地址,修改过来即可。

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理。