What Does this Code Snippet Do?

The first part (add_filter()) tells WordPress to use the direct-write method. The second part (define()) tells WordPress to apply 0751 permissions to any directory it creates. More information here. I would not consider using the Direct Write method to be safe to use in a live, public, shared-hosting environment. Also, it might not – and … Read more

Why am I unable to login after converting to www?

You don’t need a rewrite rule in .htaccess to add www back in. Remove the rewrite rule, remove all the defines in wp-config and try to login. If that doesn’t work, delete permalinks in .htaccess to force them back to default. After you’re in, add the www in Dashboard>>Settings and save. Then reset permalinks.

Creating the wp-config.php file manually

Here is how you make your config.php manually: In your download there should be a wp-config-sample.php. Open this is a text editor. Fill in your database connection details. Go to https://api.wordpress.org/secret-key/1.1/salt/ and get the code. Copy the above cope and paste into the sample file over the top of the existing defines Save the file … Read more

Custom theme folder

The default theme directory is registered like this in wp-settings.php // Register the default theme directory root register_theme_directory( get_theme_root() ); where function get_theme_root( $stylesheet_or_template = false ) { global $wp_theme_directories; if ( $stylesheet_or_template && $theme_root = get_raw_theme_root( $stylesheet_or_template ) ) { // Always prepend WP_CONTENT_DIR unless the root currently registered as a theme directory. // … Read more

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