Wrong canonical link on wp-admin pages

I have a subdomain: https://blog.example.com/ I forcibly redirects to directory: https://www.example.com/blog By changing site URL and some RewriteRule on .htaccess. My .htaccess: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /blog/ RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /blog/index.php [L] RewriteCond %{HTTP:X-Forwarded-Host}i ^example\.com RewriteCond %{HTTP_HOST} ^blog\.example\.com$ RewriteRule ^/?(.*)$ https://www.example.com/blog/$1 [L,R=301,NC] RewriteCond %{HTTP:X-Forwarded-Proto} !https … Read more

how to use a different domain/subdomain for authors/catagories on single site?

I’m not sure if I phrased this question correctly… My wife and I have one blog, family.com in this example, that we both contribute to. I would like family.com to show all blog posts. me.family.com would show only posts I author and her.family.com would show only posts she authors. later, we will add kid1.family.com and … Read more

Ban SiteNames Multisite

Is there a way to ban site names from being able to be created. For example we have subfolders like domain.com/site Is there a way to ban bad words from being registered. So domain.com/bad would be blocked? How can I do this? 1 Answer 1 You can filter domain_exists, a check that runs before a … Read more

Difference between bloginfo(‘home’) and home_url() and site_url()

I have been reading through Codex and other SO and SE posts regarding this. But I am confused. I used home_url() and site_url() to linking the site’s home and it gave same results. As I was using qTranslate for bilingual implementation. And had its language switcher. Found later, when clicked on the home logo (used … Read more

Login to wp-admin “redirect_to” points to wrong URL after migration

I have a WordPress site hosted on GoDaddy, it’s a Windows server, (i have the web.config set up). and .htaccess correctly configured. The site was working on example.com/wordpress , as it was a development test. I moved the site to example.com . I changed the site url and wordpress URL to example.com on the database … Read more

How to move existing WordPress wp-content folder along with database to new server and new domain name?

Running WP 3.5.1 on a LEMP stack (over at Linode) … I have a wp-content folder for a WP site along with a full backup of the database. The URL of the site was something like: test.example.com I want to get the site operational on my own server at: test.mydomain.com And once the site is … Read more

Rewrite default post type

I would like to rewrite the default post type URL to /blog/2016/11/my-post-name/ without affect the other post type url. I tried: add_action(‘admin_menu’,’remove_default_post_type’); function remove_default_post_type() { remove_menu_page(‘edit.php’); } add_action( ‘init’, ‘set_default_post_type’, 1 ); function set_default_post_type() { register_post_type( ‘post’, array( ‘labels’ => array( ‘name_admin_bar’ => _x( ‘Post’, ‘add new on admin bar’ ), ), ‘public’ => true, … Read more

How do I change the Multisite URL?

The links in the navbar menu, in (My sites > Manage the network) are pointing (and keep redirecting) to incorrect URLs. The incorrect URLs are in this pattern: https://https//www.domain.com/wp-admin/network/ https://https//www.domain.com/wp-admin/network/sites.php https://https//www.domain.com/wp-admin/network/settings.php Even if I manually entered the correct URL without the repeated https, I am redirected to the wrong URL again. It seems that https//www … Read more

Getting the Site URL Including the Front Base

If my permalink structure is set to /blog/%postname%/, how can I retrieve a URL for my site which retrieves domain.com/blog/? With the permalink structure mentioned above, when using site_url();, it displays domain.com/ when I’m looking to easily get the site’s URL including the front base. Maybe I’m unclear about what the “front base” actually is. … Read more