• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

I Like Kill Nerds

The blog of Australian Front End / Aurelia Javascript Developer & brewing aficionado Dwayne Charrington // Aurelia.io Core Team member.

  • Home
  • Aurelia 2
  • Aurelia 1
  • About
  • Aurelia 2 Consulting/Freelance Work

Fixing WordPress “WP_CONTENT_DIR” Theme Directory Does Not Exist Issue

General · March 12, 2014

If you are developing a site and have WordPress in a sub-folder managed as as Git submodule or just in a separate folder with a wp-content folder in the root directory one up from your WordPress install you might have encountered an issue where your themes and plugins aren’t found.

You might get a message that looks like this, “twentyfourteen – The theme directory does not exist.” this is because there is a problem with how your paths have been defined in wp-config.php

I turned my head inside out trying to resolve this and the fix was rather simple. You might notice that this issue is happening on a Bitnami WAMPP stack or XAMPP installation because of the nature of how paths work (especially on Windows).

At the end of your wp-config file you’ll see the line where the ABSPATH constant is defined right before the wp-settings include. What you will want to do is actually move this to the very top below the opening PHP tag.

You should then end up with something like this:

Please note, I have my WordPress install in a sub-folder called “wordpress”, so rename all occurences of “/wordpress” with whatever your sub-folder has been named. Same goes for the wp-content folder, if you’ve called it something else, changing all instances of “wp-content” to your prefered named folder.

Any issues you were having with defining the “WP_CONTENT_DIR” constant should now be resolved.

Dwayne

Leave a Reply Cancel reply

2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Olivier
Olivier
8 years ago

Thank you so much to help newbies!

0
Bruno Irace
Bruno Irace
4 years ago

sorry i dont know what subfolder i’ve to put in the code instaed of wordpress where i can find it out?

0

Primary Sidebar

Popular

  • I Joined Truth Social Using a VPN and Editing Some HTML to Bypass the Phone Verification
  • Testing Event Listeners In Jest (Without Using A Library)
  • How To Get The Hash of A File In Node.js
  • Thoughts on the Flipper Zero
  • Waiting for an Element to Exist With JavaScript
  • How To Paginate An Array In Javascript
  • How To Mock uuid In Jest
  • How To Decompile And Compile Android APK's On A Mac Using Apktool
  • How To Get Last 4 Digits of A Credit Card Number in Javascript
  • Wild Natural Deodorant Review

Recent Comments

  • CJ on Microsoft Modern Wireless Headset Review
  • Dwayne on Microsoft Modern Wireless Headset Review
  • CJ on Microsoft Modern Wireless Headset Review
  • john on Microsoft Modern Wireless Headset Review
  • Dwayne on Why You Should Be Using globalThis Instead of Window In Your Javascript Code

Copyright © 2023 · Dwayne Charrington · Log in

wpDiscuz