更改WordPress [图库]短代码的输出网址

Jam*_*esG 5 wordpress gallery

我最近安装了ta插件,现在将我的图像从媒体库上传到s3.

我还有FTP的整个上传文件夹到s3,其中包含大约4000张图片.

我已经在我的网站中使用了wordpress gallery短代码然而在某处并以某种方式输出了siteurl.

如何更改此设置以便我可以覆盖我的S3存储桶中的URL?

我承认我不知道我在这里做什么或从哪里开始,我真的很感激你的帮助:)

小智 1

您可能想通过数据库进行搜索和替换。

您可以在帖子中了解如何进行 SQL 查询来更改图像路径:13 个有用的 WordPress 查询

UPDATE wp_posts SET post_content = REPLACE (post_content, 'src="http://www.oldsiteurl.com', 'src="http://yourcdn.newsiteurl.com');
UPDATE wp_posts SET  guid = REPLACE (guid, 'http://www.oldsiteurl.com', 'http://yourcdn.newsiteurl.com') WHERE post_type = 'attachment';
Run Code Online (Sandbox Code Playgroud)