Images uploading to wrong directory after changing to multisite

Check the value of the ms_files_rewriting option in the site_options table. If ms_files_rewriting is disabled, then WordPress will automatically append /sites/number to that Upload Path value for the subsites. This setting should be disabled by default for any Multisite networks created after WordPress 3.5. It should only be enabled for older networks. If that setting … Read more

Create New Site (multisite); can’t get subdomain to work

This is the problem with Multisite setup. Check your wp-config.php file. Right under define(‘MULTISITE’, true); you should have this: define(‘SUBDOMAIN_INSTALL’, true); If this is set to true you will be able to add new sites as subdomains. After you do this re-check in wp-admin, what extra lines you need to add to .htaccess and wp-config … Read more

Multisite installation on IIS gives 404 trying to access the admin dashboard

As per this issue on the WordPress trac, the problem are the rules 4 and 5. The solution is to change the url parameter and add 1, so, instead of this: <rule name=”WordPress Rule 4″ stopProcessing=”true”> <match url=”^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*)” ignoreCase=”false” /> <action type=”Rewrite” url=”{R:1}” /> </rule> <rule name=”WordPress Rule 5″ stopProcessing=”true”> <match url=”^([_0-9a-zA-Z-]+/)?([_0-9a-zA-Z-]+/)?(.*\.php)$” ignoreCase=”false” /> <action … Read more

WordPress Multisite – Multiple Subdirectories

You may want to look into a Multi Network. But be aware, many plugins are not coded for this type of setup. Another alternative would be instead of making each level a full site (CA – LosAngeles – Compton being 3 levels), you could set up a MultiSite to handle the highest level (states) and … Read more

.htaccess 301 vs. 302 Enforcing HTTPS

The different .htaccess/mod_rewrite directives you see around are usually because of differences in the server configuration (nothing to do with WordPress) and where they are being used. There’s no such thing as a one size fits all. (For instance, the above redirect may not work if you are behind an SSL proxy.) However, as with … Read more

How to run nested xargs commands?

xargs is unnecessary, something similar to this will do the job without any piping or xargs: sites=$(wp site list –field=url) for site in $sites do users=$(wp user list –url=”$site” –role=subscriber) for user in $users do wp user delete $user –url=”$site” –reassign=4 end end

How to remove Broken Link Checker widget from admin menu

The problem is probably just that your code runs before broken links checker adds the meta box. Try changing the action line to this: if(is_admin()){ add_action(‘wp_dashboard_setup’, ‘remove_dashboard_widgets’, 1000 ); } EDIT To be a little more clear, the particular issue here is that the add_action() function is running super early compared to Broken Link Checker’s … Read more

How to do Domain Mapping to Subdirectories?

Domain mapping works for both subdomains and subfolders (AKA subdirectories). It used to not be available for subfolder installs via the WordPress MU Domain Mapping plugin, but that’s no longer the case for a long time. With that being said, it’s for a self-hosted blog (WordPress.org install) and not for WordPress.com.

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