What is true chmod for WordPress?

All files should be writable only by your user account. So the correct permissions for files and directories are: Directories: 755 Files: 644 You may want to secure some files: wp-config.php: for maximum security, this file should be made writable by your user only or its group. This means 400 or 440 permission .htaccess: 666 … Read more

How to disable automated E-Mail on PHP error/exception?

There was some discussion on it a few weeks ago you can find here: https://make.wordpress.org/core/2019/04/16/fatal-error-recovery-mode-in-5-2/ According to that and looking through the core, you can accomplish that with one of two methods: define(‘RECOVERY_MODE_EMAIL’, ‘[email protected]’); OR add_filter( ‘recovery_mode_email’, ‘recovery_email_update’, 10, 2 ); function recovery_email_update( $email, $url ) { $email[‘to’] = ‘[email protected]’; return $email; } Hope that … Read more

Attach pdf file to custom post type

Here this is my code which i used in my wordpress site in custom post type for adding the pdf to the post and its work for me try to change its and use it. Hope it will help function add_custom_meta_boxes() { add_meta_box(‘wp_custom_attachment’, ‘Hotel Brochure’, ‘wp_custom_attachment’, ‘hotel_post’, ‘normal’, ‘high’); } add_action(‘add_meta_boxes’, ‘add_custom_meta_boxes’); function wp_custom_attachment() { … Read more

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