Skip to content

Instantly share code, notes, and snippets.

@gegere
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gegere/9346a9e3fa8369c50b58 to your computer and use it in GitHub Desktop.
Save gegere/9346a9e3fa8369c50b58 to your computer and use it in GitHub Desktop.
Error: Strange wp-config.php file: wp-settings.php is not loaded directly.
mkdir ~/temp && cd temp
git clone https://github.com/markjaquith/WordPress-Skeleton.git wordpress && cd wordpress
git submodule update --init --recursive
wp plugins list --allow-root
# this works, let's say I edit the database credentials
# move WordPress Core back a directory
mv wp ../
# symlink the directory
ln -s ~/temp/wp wp
# wp-config.php needs to point to the correct one
echo '<?php include_once("${_SERVER['DOCUMENT_ROOT']}/wp-config.php");' >> wp/wp-config.php
wp plugins list --allow-root
# this does NOT work
# "Error: Strange wp-config.php file: wp-settings.php is not loaded directly."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment