Windows XP SP3 – Xampp 1.8.1 – PHP 5.4.7 – WordPress 3.5.1 – (all drives use NTFS)
I think my problem is similar to this one but these solutions seem only suitable for Unix-like OSs.
I’m running WordPress via XAMPP on Windows XP (SP3) and some (but not all) images are not displayed because I seem not to have file permissions to access them. When drilling down (via Chrome Developer) to the URL in a new tab, I get a 403 error.
Is changing file permissions the way to go for me too and if so, how do I do that on Windows?
Your problem is very strange and also very non descriptive .
You did not write what
version of Xampp
you are using , whatVersion of PHP
, whatversion of WordPress
..You did not provide details of your folder structure ( where is xampp, where are the images ? different drives ? path ?? NTFS ? FAT ?
You should at least post some sample code of an image that shows and an image that does not show .
But …
Here is a list of things that you might want to check or verify
english characters
)folder.
/
or(if you copied and pasted the pathes ..)
The most annoying problem that I have encountered has to do with the point of the english characters . Does the images that DO NOT appear has some umlauts , accents or non (
a-z 0-9
) characters ?? If they do , try to rename them .After you will provide some more details , it will be easier to help you pinpoint the problem..
EDIT I
After reading your comment , I believe that all your method of including images is a bit off-course , an not at all realted to xampp or your system´s folder structure / permissions. It seems to me , that you just do not know how to include files in wp themes (but I might be wrong..)
In wordpress, to link theme related images , the images should ideally be located at the theme folder
wp-content/themes/your_theme/
or better yet
then you would just call the images (in your theme) like so :
look at :get_template_directory_uri()
Alternatively you can look at get_stylesheet_directory_uri() andget_theme_root_uri()
The part where your css images would take a relative part to the css file depends on where you put them in a relative manner . are they in
themes/your_theme/img
orthemes/your_theme/css/img
or whatever . at any rate , you call them essentially the same but mind that the images that are called from WITHIN the css will always follow normal rules of css images , not the wordpress one (which is applied to php files) ..ALL images ( excluding admin ) , as a rule of thumb, should be located under the
wp-content
folder.Theme images under
themes/your_theme
and other images underwp-uploads
.In wp , a path like you described/requested of
C:xampphtdocsanneke_00wp-contentimg
is non standard , not recommended , and is used only in very extreme cases for very special reasons (surely not for theme display).If you want , you COULD in theory move your wordpress uploads folder using several methods :
Method A
Method B
as explained in the codex :
or only for uplaods
there are several other methods, but I am sure that with a bit of research you could find them ..
Now , that being said , I am not sure that I understood what you want to achieve , but if it is not some special case for some extreme circumstances of an advanced image handling plugin or something – the problem is not in your images nor in your permissions, it is in your workflow and in how you use theme images in wordpress..
Right clicking on one of the problematic images in Windows Explorer and going to the “Security” tab, what have you got them set to? The account “Everyone” should have the read permission.
Are they images which have been uploaded via the WordPress media manager?
If you have the time re install XAMPP and WPress it might work, after resatrting windows, this time install XAMPP in c:apps or d:apps and make sure that folder is read + write for all
also take care when installing WPREss and XAMPP if they are latest stable and follow the instuctions.
are any of the config files form a unix site? meaning it was on another sytem and now FTPed or copied here?
As a super ugly workaround, I decided to put all my image files in a Dropbox Public folder and copy-paste their links into my CSS. I still hope to properly solve the problem but for now I can at least carry on with the project.
I’ll post a better solution here if I find it.
You Need to follow these instructions:
Few options may differ depending upon the Windows version. I’m running Windows 7. Check to see if above solution works for you.