du0531 2019-05-21 12:06
浏览 86

在管理面板中的媒体页面中获取时出现错误403

I installed wordpress on wampserver on local machine. When trying to set featured images the media library thuumbnails are all blank and console shows

WIndows-logo-150x133.png:1 GET http://local-openminds/B:/wamp64/www/openminds_wp/wp-content/uploads/2019/03/WIndows-logo-150x133.png 403 (Forbidden)

The error remains even after I tried deploying to live server. It still retains the part

'B:/wamp64/www/openminds_wp' from local directory.

I tried setting the the WP_SITEURL and WP_HOME in wp-config.php. However it messed up the default wp admin panel

Tried this. I can see thumbnails in media but featured image is still not showing

ob_start( 'make_url_root_relative' );
function make_url_root_relative( $string ) {
     return str_replace("/B:/wamp64/www/openminds_wp/",'/',$string);
}

How can I get wp to use relative paths for the media ?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 我想在一个软件里添加一个优惠弹窗,应该怎么写代码
    • ¥15 fluent的在模拟压强时使用希望得到一些建议
    • ¥15 STM32驱动继电器
    • ¥15 Windows server update services
    • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
    • ¥15 模糊pid与pid仿真结果几乎一样
    • ¥15 java的GUI的运用
    • ¥15 Web.config连不上数据库
    • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
    • ¥15 怎么配置广告联盟瀑布流