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 ?