• I really love Akeeba Backup for WordPress. (Coming from Joomla, no surprise.) But I do have one big problem: when I restore a site online some – not all – background images don’t show. They are there, in the media folder. All I have to do is open the page and check the image. The image is there, when I re-save the page, no problem.

    It happens a lot. Not consistent, usually background images. Seems like some localhost paths aren’t properly converted.

    How can I correct that?

Viewing 1 replies (of 1 total)
  • Plugin Author nikosdion

    (@nikosdion)

    First, um, how did you find this page? ?? We had delisted Akeeba Backup for WordPress from the directory since late 2015. I was quite surprised to see a new thread on what I thought was a forum archived years ago ??

    In any case, if the problem is background images you should be looking at your CSS. It probably has absolute URLs like /wp-content/… (note the leading slash). If you are restoring in a subdirectory e.g. https://localhost/mysite these links are no longer valid as they now point to https://localhost/wp-content which is an invalid path.

    The correct solution is to write your CSS with relative paths. For example, if your CSS file is in wp-content/themes/foobar/assets/css and your background images are in wp-content/backgrounds the URL in your CSS should read url(../../../../backgrounds/myimage.jpg) instead of url(/wp-content/backgrounds/myimage.jpg). This is how CSS, web browsers and web servers work.

    Do remember that Akeeba Backup never modifies your CSS files. This has been true since its first Joomla days back in 2006. The reason is simple. We can’t be absolutely sure about what needs to be changed. It is possible to have a site which does use absolute URLs which resolve off-site and that’s intentional. There is no user-friendly way to convey that information so we chose to not do that kind of replacement and let you edit your files to use relative paths — as they should be all along to avoid problems even on your live site.

    I hope that helps!

Viewing 1 replies (of 1 total)
  • The topic ‘Some images don’t show up’ is closed to new replies.