Unable to locate WordPress Content directory (wp-content)

I had the same issue, this is usually a permission of writing in specific folder, in my case I had to change the owner of the uploads/ directory, here is what I did in wp-content directory: sudo chown -R daemon uploads/ where the user daemon is the owner of the process httpd. Hope this helps.

Loading external page template and enqueue script from plugin causes 403 forbidden error

Your CODE is fine, the reason you are getting 403 error is because $_SERVER[‘DOCUMENT_ROOT’] returns absolute PATH to your web root, not URL. JavaScript needs to be added as URL. So, you may use Load_Template_Scripts_wpa83855 function in your plugin and then use: wp_enqueue_script( ‘wtd’, plugins_url( ‘/js/wtd.js’ , __FILE__ ) ); CODE to add JavaScript. Note: … Read more

Undefined offset: 0 in > […] /wp-includes/capabilities.php on line 1067

You have found a bug in Genesis. Your Xdebug stack trace fingers the culprit as the genesis_save_custom_fields() function which calls current_user_can() with a singular capability (edit_post and edit_page) which also requires an additional argument, in this case the post ID which is missing. current_user_can() calls has_cap() which calls map_meta_cap() which does a switch statement on … Read more

How should one implement add_settings_error on custom menu pages?

There are several components to error/notice creation and display process: add_settings_error() call to add item to stack (global $wp_settings_errors variable). settings_errors transient that keeps the errors so they survive move from page to page. settings_errors() function get_settings_errors() to retrieve errors from memory or transient and then displays them. These work like a charm for Settings … Read more

WP-CLI – Selecting PHP version

Got the same problem! Just switch the php version. On my server PHP5.6 was default for apache, while CLI was configured with PHP7.1. After installing WP-CLI, with wp –info I got this result: PHP binary: /usr/bin/php7.1 PHP version: 7.1.5-1+deb.sury.org~xenial+1 php.ini used: /etc/php/7.1/cli/php.ini WP-CLI root dir: phar://wp-cli.phar And when i used the wp core install command … Read more

Is there a plugin that will override the “Error establishing a database connection” message? [closed]

http://yoast.com/custom-wordpress-database-error-pages/ You can make your own Database Error page by adding a db-error.php to your wp-content folder (/wp-content/db-error.php). You can find a good example of such a page in the link above. Don’t forget adding header(“HTTP/1.0 500 Internal Server Error”); in that file so it get a proper header message.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)