简体   繁体   中英

WordPress: Images and other assets not loading on localhost

First of all, a cordial greeting, friends, I have a problem. I am working with the design of a web page using WordPress via localhost with XAMPP, I have tried to view the project from different devices (cellphones. tablets) and by configuring the file httpd-XAMPP.config I have managed to enter the address correctly of the project

The problem is that no image, icon, or logo that I have placed on the page loads (as seen in the attached image), the menu button does not work either.

With nothing more to add and thanking you in advance for any help you can provide, I say goodbye.

图片损坏的网站截图

Have you checked the image path to see if it's correct? Are you able to access the image from the full path in a browser for example domain.com/wp-content/uploads/image.png like this?

Probable solution 1: Most of the cases, it can be the permalink issue. Please try to check by changing the permalink, first make it Plain Text and check, if it's not working then make it Post Name and then check. (To do it go to Admin dashboard > Settings > Permalink)

Probable solution 2: Sometimes, if the image and CSS do not exist in the correct location then happen this kind of issue. Please check it.

Probable solution 3: Put it in the config.php file

 define('WP_HOME','yourdomain.com');
 define('WP_SITEURL','yourdomain.com');

Thank you

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM