New folder and file permissions are not correct
Adding these two lines to the wp-config.php file solved the problem: define(‘FS_CHMOD_FILE’, 0644); define(‘FS_CHMOD_DIR’, 0755);
Adding these two lines to the wp-config.php file solved the problem: define(‘FS_CHMOD_FILE’, 0644); define(‘FS_CHMOD_DIR’, 0755);
I finally found the solution. function checkUserPermissionsInThisScreen(){ if (is_admin()){ $currentUserRoles = wp_get_current_user()->roles; if (in_array(‘shop_manager’, $currentUserRoles)){ $a = get_current_screen(); if ($a->id != ‘edit-shop_order’ && $a->post_type != ‘shop_order’){ wp_die(‘you do not have needed permissions to see this page’); } } } } add_action(‘current_screen’, ‘checkUserPermissionsInThisScreen’);
The web installer writes configuration data into that file. It needs write access for that. I don’t think this was your backdoor. There was probably a plugin or an old theme with timthumb that had a vulnerability.
Checkout User Roles and Capabilities Plugin
I Resolve this.. looks like the force upgrade change the option_value of wp_user_role under wp_option. so i replace it with the fresh value.. thank you
I have had the same issue and it is do to how apache and wordpress communicate. It has to have both owner and group permission to install from backend. The only really way to get around this is to see if your host has a server setup that way or you get your own server … Read more
You will need to restore the database prefix after using it , with something like this global $wpdb; $previousPrefix=$wpdb->prefix; $wpdb->prefix=”mainsiteprefix_”; //Database access goes here $wpdb->prefix=$previousPrefix; or you can create a new wpdb object like this: $wpdb2 = new wpdb( DB_USER, DB_PASSWORD, DB_NAME, DB_HOST );
Yes have a look at SuPHP http://www.suphp.org/Home.html, this should be on serverfault, not really a WordPress question.
The code you posted work just fine , logged in or not . I have confirmed it on my server in multiple locations. There is something else in your theme that is causing it . do you have any other conditional tags there ? like is_admin() is_user_logged_in() or any other ?? Any plugin you installed … Read more
Best thing to do is check the WP docs themselves for correct file/folder permissions and how to change them, if needed: http://codex.wordpress.org/Changing_File_Permissions Typically, all files should be owned by your user (ftp) account on your web server, and should be writable by that account. On shared hosts, files should never be owned by the web … Read more