Permalinks do not include www subdomain

Settings in .htaccess tell the server how to handle requests. Since the site previously allowed both www and non-www URLs, you’ll want to keep your .htaccess in place, so old links redirect properly. However, that doesn’t tell WP that it’s now living in the www subdomain; it stores URLs in many places. You can ignore … Read more

Programmatically creating site in a network

You’re using $user_id = get_option( ‘admin_email’ ); and then using that $user_id. However, get_option( ‘admin_email’ ); returns an email address, not the int that wpmu_create_blog() expects. So your sites are (presumably) being created with a user_id of 0. Here’s how I’d address this: $user_email = get_option(‘admin_email’); $user_object = get_user_by( ’email’, $user_email ); if ( false … Read more

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