Images in Child Themes / Themes

How to display images in a theme or childtheme in WordPress.

On Linux and perhaps some Mac systems you may have to change the owner of the folder to daemon:daemon and set chmod to 777 during development.

When you launch the site online the file permissions must be more strict. Make sure that:

  • All directories should be 755 or 750.
  • All files should be 644 or 640. Exception: wp-config.php should be 440 or 400 to prevent other users on the server from reading it.

Sometimes the images will not display because of user rights. On Linux and perhaps Mac you may have to set the owner to daemon and the usergroup to daemon:

  • # sudo chown -R daemon:daemon yourWordPressFolder/

Published by

Per Thykjaer Jensen

I am a Senior Lecturer in front- and backend web programming at the Multimedia Design and Communication Programme at Business Academy Aaarhus.

I speak several languages: PHP, Python, MySQL, JavaScript, Nodejs, HTML, CSS, and … Danish.

Background: MA it, interaction and multimedia – MA Literature history – BA Art History.