can't upload themes to wordpress
-
I am getting the following error when trying to upload a theme to wordpress, why is this?
Unable to locate WordPress Content directory (wp-content).
I tried uploading the theme via ftp but I can’t open wp-content, why is this?
I tried adding:
` if(is_admin()) {
add_filter(‘filesystem_method’, create_function(‘$a’, ‘return “direct”;’ ));
define( ‘FS_CHMOD_DIR’, 0751 );
}`but it gives me a syntax error, as it can’t find is_admin().. why is this? My wp-config looks like this:
<?php
/***
* WordPress’s Debianised default master config file
* Please do NOT edit and learn how the configuration works in
* /usr/share/doc/wordpress/README.Debian
***//* Look up a host-specific config file in
* /etc/wordpress/config-<host>.php or /etc/wordpress/config-<domain>.php
*/
$debian_server = preg_replace(‘/:.*/’, “”, $_SERVER[‘HTTP_HOST’]);
$debian_server = preg_replace(“/[^a-zA-Z0-9.\-]/”, “”, $debian_server);
` $debian_file = ‘/etc/wordpress/config-‘.strtolower($debian_server).’.php’;
/* Main site in case of multisite with subdomains */
$debian_main_server = preg_replace(“/^[^.]*\./”, “”, $debian_server);
$debian_main_file = ‘/etc/wordpress/config-‘.strtolower($debian_main_server).’.php’;if (file_exists($debian_file)) {
require_once($debian_file);
define(‘DEBIAN_FILE’, $debian_file);
} elseif (file_exists($debian_main_file)) {
require_once($debian_main_file);
define(‘DEBIAN_FILE’, $debian_main_file);
} elseif (file_exists(“/etc/wordpress/config-default.php”)) {
require_once(“/etc/wordpress/config-default.php”);
define(‘DEBIAN_FILE’, “/etc/wordpress/config-default.php”);
} else {
header(“HTTP/1.0 404 Not Found”);
echo “Neither <b>$debian_file</b> nor <b>$debian_main_file</b> could be found. <br/> Ensure one of them exists, is readable by the webserver and contains the right password/username.”;
exit(1);
}/* Default value for some constants if they have not yet been set
by the host-specific config files */
define(‘ABSPATH’, ‘/usr/share/wordpress/’);
define(‘WP_CORE_UPDATE’, false);
define(‘WP_ALLOW_MULTISITE’, true);
define(‘DB_NAME’, ‘wordpress’);
define(‘DB_USER’, ‘wordpress’);
define(‘DB_HOST’, ‘localhost’);/* Default value for the table_prefix variable so that it doesn’t need to
be put in every host-specific config file */
if (!isset($table_prefix)) {
$table_prefix = ‘wp_’;
}require_once(ABSPATH . ‘wp-settings.php’);
?>
`
- The topic ‘can't upload themes to wordpress’ is closed to new replies.