# Fixing broken image links in WordPress

> Fix images that do not show in WordPress by correcting file permissions on the uploads folder and checking image paths after a move.

Source: https://helpcenter.ruachost.com/wordpress/guides/fixing-broken-image-links-in-wordpress/

Broken image links in WordPress occur when uploaded images don’t display correctly in posts or pages. Instead of the image, you may see a placeholder or a missing file icon. On **ruachost.com**, this issue is usually caused by incorrect file permissions or misconfigured paths.

## Common Causes

- Incorrect **file permissions** on the `wp-content/uploads` directory.
- Images uploaded to the wrong directory.
- Migration errors (site moved without updating paths).
- Corrupted database entries pointing to missing files.

## Step‑by‑Step Resolution

### 1. Check File Permissions

1. Log in to **cPanel**.
2. Open **File Manager**.
3. Navigate to:

   ```
   /home/username/public_html/wp-content/uploads
   ```

   (Replace `username` with your hosting account username.)
4. Ensure:

   - Directories are set to **755**.
   - Files are set to **644**.
5. Update permissions if necessary.

### 2. Verify Upload Path

- In WordPress, go to **Settings → Media**.
- Confirm that the upload path is set to:

  ```
  wp-content/uploads
  ```
- Correct the path if it points elsewhere.

### 3. Clear Cache

- If you use caching plugins (e.g., LiteSpeed Cache, WP Rocket), clear the cache.
- Also clear CDN cache if using Cloudflare or another provider.

### 4. Re‑Upload Missing Images

- If files are missing, re‑upload them via the WordPress Media Library.
- Update posts/pages to point to the correct image URLs.

### 5. Database Check (Advanced)

- Log in to **phpMyAdmin**.
- Open your WordPress database.
- Check the `wp_posts` table for entries with `post_type = attachment`.
- Verify that the `guid` field points to the correct image URL.
- Update incorrect entries if needed.

> **Note:**
- If WordPress was installed in a subdirectory or subdomain, the `uploads` folder will be located beneath that directory.
- Always back up your site before making changes.
- Use a plugin like **Regenerate Thumbnails** if image sizes are missing.

##
