• Resolved bvo

    (@bvo)


    Hi all,

    I have some problems with my media library. See here

    Looking for the solution I found out something strange: (internal) links to my posts do work, but links to images don’t.

    So, I can link form one post to the other with no problem using the complete (absolute) address, i.e. https://www…/postname. When I do this with an image, I get a 404. However, when I put “wordpress” inbetween the site address and the image location, it works. I.e. https://www… / wordpress/imagefolder/imagename.

    So either the settings are wrong, or htaccess, or… Can someone give me some directions.

    Ps this all started after updating to 4.7 (I did a new install, also manually, I deactivated all plugins, I tried the default theme, etc).

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hey!

    Yes, .htaccess file may be causing this. Please go to WordPress Dashboard -> Settings -> Permalinks and try different settings there to see if one of them works.

    All the best,
    Kris

    Thread Starter bvo

    (@bvo)

    Hi Kris,

    Thanks for your reply.
    Links tot posts do work (also plugins, themes do work), so wordpress does know where the wp-content folder is. Also the uploads folder is there (made by wordpress). Only images (I made a images folder in wp-content) goes wrong. It used to work before updating to WP4.7

    In permalinks I use site url / %/postname%/
    In settings/general I see:
    wordpress url : https://www.basenmandy.nl/wordpress (I cannot change that)
    site url: https://www.basenmandy.nl (without “/wordpress”, I can change that)

    I want to use my site without “/wordpress” in the url, and as I said, it works for the posts and pages, but not for images.
    So somehow of somewhere I have to tell wordpress that all images are stored in https://www.basenmandy.nl/wordpress/wp-content/images…

    Hi again,

    In this case, I could recommend you to check out this Codex Page from WordPress – https://codex.www.ads-software.com/Giving_WordPress_Its_Own_Directory

    It has all the info you need to make a website work, when the files are in a different folder. Also, at the bottom of the Page, there are links to other resources as well, like “Moving Uploads Folder”.

    I hope this information is helpful to you.

    Merry Christmas!
    Kris

    Thread Starter bvo

    (@bvo)

    Hi Kris,
    Thanks again. I looked at the codex page. I followed all steps.

    Both index.php files are correct.

    I deleted both htaccess files, then logged out, closed the browser and logged in again. The htaccess in the root was recreated, in wordpress map not (is that ok or not?)

    The site url and worpdress url, and the permalinks were not changed, and are like the codex page.

    So it looks like everything is like in the codex page, but still the images are nog working. For some reason, links to posts do work, wordpress can find the wp-content folder where themes and plugins are in, but the image folder (also in wp-content) can not be found…

    Hi again,

    Could you please test this solution – https://wordpress.stackexchange.com/questions/26858/wordpress-in-a-sub-directory-but-not-images as well?
    Sorry, this was removed in WordPress 3.5.

    Could you please provide me with your WordPress Admin details (Website URL, Username and Password) and FTP details (Server Address, Username and Password), so I could take a closer look at the issue? Thank you!

    PS! – Please make sure that you send them to [email protected] and not post here, as they will be public otherwise!

    If I am asking too much, then I understand, but I would definitely like to find out, what is the issue at the moment.

    All the best,
    Kris

    • This reply was modified 7 years, 11 months ago by kriskorn.
    Thread Starter bvo

    (@bvo)

    Hi all,

    I checked (again) wordpress settings, htaccess, index.php etc. Thank you Kris!
    However, the problem isn’t solved.

    To be sure I deleted all uploaded images and uploaded them (a few) again. Still the same.
    When I look in the database with phpmyadmin I see that the images were added (last additions in wp_posts). In the database the guid to this images is : siterul/wordpress/wp-content/uploads/imagename. When I copy this link to the browser, the image shows up.

    However, in settings I made the site url without “wordpress” (the wordpress address is obviously siteaddress/wordpress). As I mentioned before, posts, themes, plugins etc work fine. Links tot posts work with siteaddress/postname.

    So why does wordpress not use the settings for site url for my images? Why does it want to use siteaddress/wordpress/ ???

    Thread Starter bvo

    (@bvo)

    I started all over (once more). Fresh install, imported the posts etc (after exporting with worpdress exporter; not via phpmyadmin backup), and it all works. For some reason it was all fucked up, and the fresh install I made earlier, I imported a sql backup, so I probably imported the errors as well.
    No everything works great again. finally ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘link to images’ is closed to new replies.