Determining WordPress Paths and URLs

I often need to include a directory or URL path when writing a theme or plugin, but I can never find all of the different options in one place, so I’m pulling it together from various Codex pages and xref. Constants ABSPATH – /var/www/vhosts/example.com/httpdocs/ WP_CONTENT_DIR – /var/www/vhosts/example.com/httpdocs/wp-content WP_CONTENT_URL – http://www.example.com/wp-content WP_PLUGIN_DIR – /var/www/vhosts/example.com/httpdocs/wp-content/plugins WP_PLUGIN_URL – http://www.example.com/wp-content/plugins TEMPLATEPATH – /var/www/vhosts/example.com/httpdocs/wp-content/themes/parent-theme STYLESHEETPATH – /var/www/vhosts/example.com/httpdocs/wp-content/themes/child-theme […]

Continue reading...

Directory Permissions for WordPress under Plesk/Linux

Jason Diehl describes the right way to setup directory permissions on a Linux box running Plesk so that WordPress can automatically create the directories it uses to store uploads. Basically, you need to make sure that PHP’s safe mode is turned off and that wp-content is owned by apache, in the apache group, and chmod’d to 777.