WP-Admin not working properly at WordPress multisite with subdirectories

If you installed WordPress Multisite starting with version 3.0 to 3.4.2, you’ve got the correct .htaccess file contents. However, if you started with a newer version (3.5 or higher)—and I’m assuming you did, if you’ve just installed WordPress Multisite recently—your .htaccess file should look like this: RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] # … Read more

What is the best way to load the WP environment in a subdomain of my multisite WordPress install?

Use the defines to make it pick the site you want it to pick. You can define these four to setup the $current_site values properly: DOMAIN_CURRENT_SITE, PATH_CURRENT_SITE, SITE_ID_CURRENT_SITE, BLOG_ID_CURRENT_SITE. If you check the wpmu_current_site() function in ms-load.php, you’ll see that it uses those to create the $current_site global. You may or may not have to … Read more

Displaying content from one WP site on separate WP site

Yeah $wpdb2 = new wpdb(‘dbuser’, ‘dbpassword’, ‘dbname’, ‘dbhost’); // get 10 posts, assuming the other WordPress db table prefix is “wp_” $query = “SELECT post_title, guid FROM wp_posts WHERE post_status=”publish” AND post_type=”post” ORDER BY post_date DESC LIMIT 10″; $someposts = $wpdb2->get_results($query, OBJECT); foreach($someposts as $somepost) echo “<a href=\”{$somepost->guid}\”>{$somepost->post_title}</a><br />”; Another way is to use the … Read more

How to load WordPress on non WP page?

The shortest way is to load wp-load.php and abort the loading of the template engine (Note: You couldn’t do that, if you’d be loading the header file, like you see it on many sites in the interweb). # No need for the template engine define( ‘WP_USE_THEMES’, false ); # Load WordPress Core // Assuming we’re … Read more

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