Tag Info

Hot answers tagged

4

Here's the code from wp-admin/includes/file.php: if ( ! $method && function_exists('getmyuid') && function_exists('fileowner') ){ if ( !$context ) $context = WP_CONTENT_DIR; // If the directory doesn't exist (wp-content/languages) then use the parent directory // as we'll create it. if ( WP_LANG_DIR == $context ...


2

This issue is solved. The permission problem has to do with how files are uploaded to the WordPress site while updating. The suPHP solution is my preference at this point because it is simpler and requires less permissions on files, but if you don't want to do that then you'll have to take care to get your FTP user playing nicely with WordPress. suPHP ...


2

Here's what Codex has to say on restricting database user privileges: For normal WordPress operations, such as posting blog posts, uploading media files, posting comments, creating new WordPress users and installing WordPress plugins, the MySQL database user only needs data read and data write privileges to the MySQL database; SELECT, INSERT, UPDATE and ...


2

Depends on what you mean by "redirect". If you want to 404 them, this will do the job: add_filter('wp_die_handler','custom_404_die_handler'); function custom_404_die_handler() { global $wp; $wp->handle_404(); load_template(get_404_template()); die(); } If you actually want to redirect them somewhere, then you could do something like ...


2

If you did want to lock things down.... a normal wordpress site will usually only require the database user to have SELECT, INSERT, UPDATE and DELETE. If you want to use the automatic update feature it will also require CREATE and ALTER. Some plugins may require other permissions but most won't.


1

I found the problem. In settings > media the folder for uploads was actually pointing to a different path. Once I redirected it to wp-content/uploads it all worked.


1

Do you have any kind of cache plugin used? Perhaps to help speed up the website. If Yes that just may be the issue here. Another suggestion is change the current active theme to any default WP theme (twentyThirteen, TwentyFourteen), and then see if Preview give you an issue. If it does not, then its possible that there is an issue with your current ...


1

If you need to change the template used, you can use the template_include filter (change "itermediate-template.php" and "page.php" with correct file names of your template files): add_filter( 'template_include', 'cyb_exclude_template_for_editors', 99 ); function cyb_exclude_template_for_editors( $template ) { $user = wp_get_current_user(); if( ...


1

Your files should be owned by your account. Period. They should not be owned by the "apache" user. This is insecure. The files may need to be readable by the apache user. The recommended permissions are 755 for folders and 644 for files. With the exception of the wp-config.php file, which should be set to the lowest permissions that work. This would be 640, ...


1

You can simply delete the lines from your wp-config.php. define('FTP_HOST', 'yourhost.com'); define('FTP_USER', 'youruser'); define('FTP_PASS', 'yourpass'); However, this does not automatically mean that you are secure. There are a lot of backdoors where malware could be injected, starting from the server, security-issues in your plugins, outdated ...


1

For starters, the WordPress Codex has a wealth of information on this very topic. For the sake of brevity that should take care of most of it; however, there are some relievant points that should be made: If you do not wish WordPress (essentially PHP) to have access to the file system with the exception of dynamic static assets such as images or cache then ...


1

Your local site is on a Mac, which uses a different users and groups system than a production (linux) environment. I would recommend that you change the permissions to what they should be on the local dev environment to what they should be before you upload them to a production/QA environment. Please refer to this article for more on the specific permission ...


1

There are several sides to this. What it should be ideally, what is is practically, and what it usually has to be practically. There are two contexts to the writing files in WordPress. Just do it with PHP The locked down hardest scenario here is that only uploads is writable. Otherwise core functionality will start to break down. However plugins might ...


1

Ok, I found the permission read private posts so I revoked that privilege to the reader group and marked the articles I didn't want them to see as private. Doing any sort of permissions in WordPress feels kind of hacky, but this is a much better solution than modifying source code.


1

You are using Ubuntu package for WordPress right? Had you tried conventional install (just downloading official WP archive and setting it up with LAMP)? While it's not very "Linux way" maybe, it's commonly suggested to stick with that for WordPress. I briefly dealt with Ubuntu WP package in the past and ended up doing just that as well. PS if that 3.8.2 ...



Only top voted, non community-wiki answers of a minimum length are eligible