Posts Tagged ‘WordPress Support’

WordPress 404 – File or directory not found, broken Images, multisite image path error.


Easy IT Support - 2

Resolving WordPress 404 errors – File or directory not found, broken Images in WordPress, and multisite image path error

We created these notes because of WordPress 404 errors when setting up our site on Microsoft IIS - File or directory not found, broken Images in WordPress, multisite image path error and the amount of work we put in on this issue and we are hoping this will help others who are setting up a new WordPress website on IIS.

We are also running WPLMS as our current WordPress theme. Which is a large enterprise premium Learning Management System for WordPress by

See our YouTube video detailing the below steps:

This article is related to:

1. Enabling Pretty Permalinks in WordPress
2. Windows Server and IIS
3. Installing and Configuring WordPress to work on IIS.
4. Setting Up WordPress on IIS
5. HTTP 404.0 when opening a page in WordPress.
6. 404 - File or directory not found. The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
7. Getting Images to display in WordPress
8. WPLMS HTTP 404.0
9. Multisite image path error

First we will look at the 404 - File or directory not found error when any sub-page is opened on the site.

404 - File or directory not found and image path error.

Below were the errors we were getting on a new setup and install of WordPress and WPLMS.

Note: This could more than likely fix other issues with WordPress and other themes. This is not necessarily related to WPLMS Theme but more of an issue with our WordPress install and set up on Windows Server 2012 R2.

From a client: 404 - File or directory not found

404 error and WPLMS and WordPress

And in some cases: HTTP Error 404.0 - Not found404 error and WPLMS and WordPress 2

Testing to see if the Permalink Settings are the issue:

To quickly see if you are having the same issue as we did.  Add the following to your Custom Structure in the WordPress Permalink Setting page:

Settings--> Permalink 


Permalink Setting

Not all the pages may work yet.  Keep checking to see if some work and others don't.  You may also want to switch back to a default WordPress themes such as Twenty Fifteen.

If some pages are now working and others don't try adding the following next.  Or, if none of the sub-pages are displaying yet and you're still getting the 404.0 Error try the following too!

Note: Don't worries if the images aren't working yet.  We will get to that soon!

Is URL Rewrite Installed?

IF not see below Web Platform Installer.

In IIS makes sure URL Rewrite is installed.  It was installed in our default install of IIS.  If not, see below.

URL Rewrite

Is the Web Platform Installer?

If the Web Platform Installer is not installed you need to add it to install the URL rewrite  (yep, install it too;  Don't worry its a very simple install).

Microsoft Web Platform Installer

Installing URL Rewrite:

Simply do a search for the installer (URL Rewrite) and Add it to IIS.  Do not configure it.  We will get some things added to it later.

URL Rewrite

Configuring Web.Config:

Add the below text to Web.Config where your site is configured:  (e.g. ..wwwrootwordpressWeb.Config).

Open the Web.config file that is located in the same directory where the WordPress files are installed, and paste the below XML section into the system.webServer element.

This rule will try to match any requested URL. If the URL does not correspond to a file or a folder on the file system, it will rewrite the URL to the Index.php file. At that point, WordPress will determine which content to serve based on the REQUEST_URI server variable that contains the original URL before it was modified by this rule.

<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<action type="Rewrite" url="index.php" />

This is how are Web.Config looked after we made the change:


Save the file.  Reopen it and make sure the changes have been applied.  Restart IIS.

IIS Restart

After adding the above rewrite code to the Web.Config file you will see this in IIS URL Rewrite.  Make sure you have your website folder highlighted and not another location in IIS (e.g /wordpress). There should not be a need to add anything else.  When we when back into IIS and looked at Match setting it look to be different then what we pasted in the Web.Config file.

URL Rewite


This is what it should look like for both REQUEST_FILENAME.

  • Is Not a File
  • Is Not a Directory

Note: We tested this and when we set it to "Is a File" and Is a Directory" it broke the pages again.  So, leave it set as the screenshot shows.

URL Rewrite 5


Now you can try to test the site and see if it works, but we are not done.

Changing the Permalink Settings:

We changed our Permalink Setting back to Post name because our install of WPLMS highly suggested that this be set this way.  We could not tell if that broke anything leaving it to Custom Structure or not.  You may be OK leaving it.  We did NOT and we switched it to Post name.


Permalink Settings Post Name2


Images added to a WordPress page are not being displayed:

Finally, new images we added to a WordPress page don't seen to be displaying even though they are in the Media Library.

Add this to the root folder .htaccess file. Restart IIS. (Getting Images to display in WordPress).

Note: by default WordPress does not create a .htaccess file.  Simply create this file using word in the root folder of your WordPress site.  Make sure it has the dot (.) in front of the file.  See the screenshot below.

Note: you may need to show hidden files and folders in Explorer to see this.  IF you don't see it then go ahead and create it.  We had to create one.  Make sure it is .htaccess

htacess 3

Add the below to the .htacess file.  Stop and Start IIS.

Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all

Folder Permissions:

Finally, set the correct file permissions on the site (e.g. /WordPress) folder for the IIS_USER.  Open Explore and set the file permissions.

folder folder permissions

Select Advanced -->  Then select the Replace all child permissions...


Goodluck!  If you need additional help with WordPress you can contact us at

Other things to try, and links to other related topics:

If your still having issues here are a few more thinks to look at.


Setting permission on wp-content folder.



1. Change the permissions on the temp folder giving IIS_IUSRS write/modify.

2. Change the path of the temp folder in the PHP.ini file to a folder that does have IIS_IUSRS write/modify permission.

Here is a good source detailing the problem:

I chose to move the temp folder in my PHP.ini to C:inetpubtempuploads and also give it permissions.

After uploading an image in wp-admin, I was able to access the image (original, not resized) from a browser wihout the 500.50 error.


Installing WordPress on IIS:

Install Internet Information Services 8.5 and WordPress 3.x by Using the Microsoft Web Platform Installer 5.0


If you would like help with this or other WordPress issues and design please call us or complete the form below:

Easy IT Support


Providing Computer Consulting, Support and Microsoft Solutions for your Business.

You focus on your business and we'll focus on the technology!

Call us today 1-844-997-8776

Why Easy IT Support?

Do you need a IT partner that understands how important keeping your systems, applications and websites operating at peak performance is to your business? A partner that does more than just respond when things break.


Tel: 1-844-997-8776

Easy IT Support Facebook Logo
ringcentral partner
  •  Minimize expenses—no up-front hardware to buy, no maintenance costs, and affordable monthly charges.
  • Keep your IT organization nimble by more quickly deploying new extensions and locations.
  • Save valuable IT resources through streamlined network management and support.
  • Stay safe and current with automated software updates and multiple layers of security.
    Empower your employees to get their work done on their own terms, faster and more efficiently.

We are happy to announce our partnership with RingCentral.

Positioned furthest in the Leaders Quadrant for completeness of vision and ability to execute.

Read me here

Easy IT Support

We are happy to announce our partnership with Century Business Solutions. Partnering means sharing our goal of helping businesses become more efficient through integrated credit card processing. Our partnerships bring a wealth of opportunities to both parties, strengthen relationships, and add value to our clients.

Read me here

Partnering with Century Business Solutions!

Century Business Solutions Partner
Easy IT Support

Do You Need Help Optimizing Your SQL Server?

SQL Database Tuning

SQL performance tuning can be an incredibly difficult task, particularly when working with large-scale data where even the most minor change can have a dramatic (positive or negative) impact on performance.  Let  Easy IT Support help you with your database tuning needs!

Easy IT Support
Microsoft Authorized Reseller

Authorized Reseller of Microsoft Surface Products

We are ready to provide Microsoft Surfaces to suit the needs of your business.

Easy IT Support

Let us help you cleanup your hardware and software.

Let  Easy IT Support help you with all your IT needs for your business!

Easy IT Support
cloudflare partner

Easy IT Support is happy to announce a new partnership with CloudFlare, the web’s easiest performance and security solution.

As a CloudFlare Certified Partner, we deliver their solutions to help protect and accelerate your website.

CloudFlare Certified Partner

Once your website joins the CloudFlare community, it loads twice as fast and is protected from a range of online threats.

To learn more about CloudFlare, you can watch the introductory video here. We are delighted to offer this great service to you and help make your website faster and safer.


Easy IT Support


We've partnered with Carbonite to keep businesses running smoothly. Whether it's computer protection, server backup or both, you can easily find the solution that meets your needs.

Easy IT Support

All the IT Support your business needs, in one place!!

Let us provide you a free estimate and computer support. We would love to see how we can help. 

Easy IT Support

Are you ready to re-imagine your applications in the Cloud?

Are you ready to upgrade your email to Exchange Online? 

Microsoft Exchange Online
Easy IT Support

"We decided to move our IT support to Easy IT Support because they provided a lot more support and a lot more services."

Easy IT Support Customers
Easy IT Support
WordPress development and Support

See our Maintenance Plan Features!

When Was Your WordPress Site, Servers and Applications Last Serviced?

Easy IT Support

Come Follow Us!

Upcoming Events!

We would love to hear from you.

Please enter your name.
Please enter a message.
Please check the captcha to verify you are not a robot.