Reputation: 589
For some reason, all of my wordpress images stopped displaying. I've tried disabling all plugins, and reverting to twenty-twelve theme, but still nothing.
When I login to the dashboard and go to the Media Library, this is what I see:
But when I click on one of the images, and go to its path, the image URL will load the image.
It almost seems as if Wordpress has disconnected itself from my uploads folder?
Lastly, on my homepage, when I right-click on the broken image link for my logo (that's not displaying), and choose "Open image in new tab", it doesn't actually return the image URL. It returns:
http://127.0.0.1/
Has anyone else come across this before? I have no idea where to begin solving this, as it doesn't seem to be associated with my theme, or my plugins, and my Wordpress core is up to date.
Any help would be much appreciated. Thanks!
Upvotes: 0
Views: 10796
Reputation: 11440
The change the the htaccess file that you mentioned in a comment is likely the cause. This is not part of WP Security plugin. Since you have that security plugin installed, you hopefully made a restore point of your htaccess file and should be able to get a good copy back quickly - it's one of the plugin's features.
Details here: https://www.tipsandtricks-hq.com/how-to-restore-the-htaccess-file-when-using-the-all-in-one-wp-security-plugin-5945
If you need to redo the file via FTP instead, here's a list of the most likely htaccess file content, derpending your site's exact needs: http://codex.wordpress.org/htaccess
Probably, it should look like ths:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Upvotes: 1
Reputation: 875
It can be a hack, but this generally happens when your wp_options are not correctly configured.
Quick way to solve: Restore a backup to a previous working condition.
If you don't have a backup or want to check other options, try this:
EDIT: Method 2 - re-create .htaccess
Upvotes: 0