Syntax of FS_CHMOD_DIR and FS_CHMOD_FILE

The basic syntax for define() is: define ( $name, $value ) In the above definition, the value is: ( 0755 & ~ umask() ) The ‘&’ (ampersand) is the ‘And’ bitwise operator, the ‘~’ (tilde) is the ‘Not’ bitwise operator, and the umask() function returns the current umask. To answer your question in short (if … Read more

Generate WordPress salt

Does WordPress core has this function defined somewhere? While I haven’t used it, you are probably looking for wp_salt or wp_generate_password. wp_salt is located in wp-includes/pluggable.php. can these salts be generated randomly Yes, of course. are there any specific rules for creating them There is no specific rule. The generic rule is to create long, … Read more

Permalink Issues by Installing WordPress in Subdirectory / Subfolder

What I generally do Install WP in sub directory. Open permalink set required permalink. Open settings->general link Remove the sub directory name from ‘Site Address (URL)’ Cut the index.php and .htaccess files from sub directory and paste them to root change code in index.php as you did. Again access settings->permalink save the form Done. You … Read more

Is there a way to define wp_blogs domains in wp-config?

When WordPress loads multisite, it includes the relevant MS specific files in wp-settings.php The relevant lines: <?php // Initialize multisite if enabled. if ( is_multisite() ) { require( ABSPATH . WPINC . ‘/ms-blogs.php’ ); require( ABSPATH . WPINC . ‘/ms-settings.php’ ); } elseif ( ! defined( ‘MULTISITE’ ) ) { define( ‘MULTISITE’, false ); } … Read more

domain mapping confused about sunrise

Apparantly this happens with the newer version of domain mapping because sunrise.php itself needs to be updated. To solve it I: Copy the new sunrise.php file from wp-content/plugins/wordpress-mu-domain-mapping/sunrise.php to wp-content/sunrise.php and you’ll be fine. And it works now.

How to use live images on local install?

Try to filter the output URLs temporarily to replace them with online images, using the following code: add_filter( ‘wp_get_attachment_image_src’, function ( $image, $attachment_id, $size ) { // For thumbnails if ( $size ) { switch ( $size ) { case ‘thumbnail’: case ‘medium’: case ‘medium-large’: case ‘large’: $image[0] = str_replace( ‘localhost/’, ‘EXAMPLE.COM/’, $image[0] ); break; … Read more

Missing a temporary folder despite settings in wp-config.php

try to use get_temp_dir() to see if wordpress is using your WP_TEMP_DIR constant. i’ve tried this code in wp-config.php and it works define(‘WP_TEMP_DIR’, dirname(__FILE__) . ‘/wp-content/temp/’); but you have to put it before the /* That’s all, stop editing! Happy blogging. */ in your wp-config.php file.

COOKIE_DOMAIN setting confusion

As cdn.mydomain.com is not part of your WordPress network, it wont be affected by your settings. The COOKIE_DOMAIN constant should only be used if you want to serve cookies from a single domain for all your sites in the network. If you omit the constant or set it to an empty value, cookies will belong … Read more

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