WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Images broken in Library and get 403 Forbidden (11 posts)

  1. Cygnus X-1
    Member
    Posted 1 year ago #

    Hi,
    I've created such a mess I don't know where to start. I think problem started when I went to updates and ended up updated my theme without doing a backup first.

    Now, the links on my site are all broken and even in the media library they are broken. If I upload a new image, it appears broken as well. I checked via FTP where the the image path is and the images exist there, but don't show up on the site.

    Furthermore, now when I go to the site or try to login to it, I'm getting "Forbidden you do not have permission to access..."

    I haven't received a call from my client...yet. Hoping to resolve soon!

    Thanks.

  2. Krishna
    Volunteer Moderator
    Posted 1 year ago #

    Can you post the site URL?

  3. Cygnus X-1
    Member
    Posted 1 year ago #

  4. Krishna
    Volunteer Moderator
    Posted 1 year ago #

    Can you deactivate all plugins and revert to Twenty Twelve theme and see if it helps. If you cannot login, you can FTP into server or use the control panel/ File Manager of your host to make the above changes.

  5. Cygnus X-1
    Member
    Posted 1 year ago #

    OK. From FTP is easiest way to rename plugins folder to deactivate? And in themes folder remove all theme folders except for Twenty Twelve? thx

  6. Cygnus X-1
    Member
    Posted 1 year ago #

    Hello. Just wanted to reply with update for those with similar problem as I experienced.

    I recreated and uploaded the .htaccess file which has now resolved the "Forbidden - you do not have access..." error. So I could at least log back into my WordPress admin.

    I did some research on broken images with WordPress and finally found a thread that noted 9 times out of 10 this is the result of a rogue .htaccess file. Sure enough there was a .htaccess file in my images folder and I just renamed it htaccess.txt. Most of my images were back except for my gallery images which were pointing to a folder in my uploads that no longer existing and I simply had to upload those again.

    Not exactly sure why this happened or if I really fixed the proper way, but so far so good!

  7. kellyt1107
    Member
    Posted 1 year ago #

    Cygnus - how do I find that htaccess file?

  8. Cygnus X-1
    Member
    Posted 1 year ago #

    Cygnus - how do I find that htaccess file?

    I'm no expert, but this worked for me for the issue I was having which was broken images appearing even though the image URLs and permissions are correct. Again, I think this started when I updated my theme (and in the future I will always do a backup before updating a theme to test it out first).

    The htaccess that was causing the problem by blocking the images was in my wpcontents > uploads folder. I renamed this one "htaccess.txt".

    There should be a htaccess file in the root directory of your WordPress as well. I replaced this with a new .htaccess file by opening notepad, just putting a blank space and saving the file as .htaccess.txt. Then I uploaded it and replaced my exising .htaccess file by renaming it .htaccess.

    This fixed my broken images issue. Hope this helps.

  9. kellyt1107
    Member
    Posted 1 year ago #

    Cygnus - you did better than I did. I spent an hour with hostgator and my media files are gone. They did a automatic backup yesterday afternoon, so for $15 I can re-set to that. They have no idea where my files went. :-(

  10. Cygnus X-1
    Member
    Posted 1 year ago #

    Kelly - that's too bad. I'm trying to get into the habit of doing regular backups myself which I've avoided in the past. Think BackWPup looks decent. Hope you can locate those media files and get your site back to normal real soon.

  11. kellyt1107
    Member
    Posted 1 year ago #

    Cygnus - They should be restoring my file any time now.
    I've been told that the plug-in WP Complete Backup 3.0.5 can backup and send the file to your email. I'll be looking for that.

Topic Closed

This topic has been closed to new replies.

About this Topic