The site_url template tag retrieves the (admin/backend) site url for the current site (where the WordPress core files reside) with the appropriate protocol, 'https' if is_ssl() and 'http' otherwise.

learn more… | top users | synonyms

27
votes
5answers
34k views

What's the difference between home_url() and site_url()

My understanding is that site_url() returns the location where the wordpress core files are. So, if my blog is hosted at http://example.com/blog then site_url() returns http://example.com/blog But ...
9
votes
4answers
10k views

What is difference between get_bloginfo('url') and get_site_url()?

I am developing a plugin. I want to know difference between get_bloginfo('url'); and get_site_url(); I got same output, then what's the difference?
8
votes
1answer
350 views

Two (or more) parallel (sub-)TLDs that are retained when surfing the site / dynamically set the site address?

I am running a site for a German NGO under the domain sub.example.org. Recently, I added sub.example.ch for its Swiss spin-off. Both (sub-)domains are pointing to the same physical location, a WP ...
6
votes
3answers
916 views

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 ...
5
votes
1answer
4k views

Switching MultiSite installation from HTTP to HTTPS

I installed MultiSite with the URL set as http://example.com, but now I want to force all requests to go over HTTPS, so I'm trying to change the URL to be https://example.com. I've gone through the ...
4
votes
7answers
5k views

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: ...
4
votes
3answers
5k views

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 ...
4
votes
1answer
350 views

Run WordPress frontend and backend in different domains

I want to run my WP frontend as www.example.com and my backend (i.e. wp-admin) as user1.example.org, is it possible? The reason is I want to host lot of sites in a single server which has only 1 IP ...
3
votes
1answer
119 views

How to set ipv6 address as siteurl?

I have try to set ipv6 ip address as home and site url, but it seems not work perfectly. From there: http://[2001:da8:d800:71::250]/wordpress/ (if you view the source) we see that some url, such as ...
3
votes
1answer
36 views

How to remove /index.php/ from URL's

I'm a pretty basic WordPress user and know enough to install a theme and customize it. I'm helping a friend out with a new website and installed WordPress 4.4.2 in the root directory via cPanel on his ...
2
votes
1answer
140 views

Why does WordPress rely on an fully qualified site_url with a 15-step plan for moving a site?

From the Moving WordPress codex page (emphasis mine): When your domain name or URLs change there are additional concerns. The files and database can be moved, however references to the old ...
2
votes
1answer
42 views

Switch from https back to http

I recently moved my site to https, by installing a SSL-certificate on the server and updating the site address and site home in the wp-admin to use https. Due to some errors my client is experiencing ...
2
votes
2answers
2k views

Relative or dynamic site url possible?

I have a local Xampp wordpress installation that I am using as sort of an intranet with some people I work with. I require them to be able to access it on our LAN router -- I found that I needed to ...
2
votes
4answers
834 views

Changing Site Address (URL) causes 404

Thank you in advance for any help you might provide. I have read many other posts, and unfortunately the provided solutions did not work. The problem is this: I have Wordpress installed in a ...
2
votes
1answer
155 views

Customize multisite site creation with user data

No, I've never made a plugin. But I would like to, or find someone who can work with me on it. What I'm hoping to accomplish is setup presets on site creation. I need my multisite to do this: When ...
2
votes
2answers
176 views

Getting links to work the same on development and production

I am working on a website where I am specifying links to pages within my site in other pages. I am using the same permalink post name structure i.e. http://example.com/sample-post on both development ...
2
votes
0answers
134 views

Prevent “main” WPMU site_url() being returned in functions

I've noticed that in a WordPress MU install with domain mapping enabled, some functions return URIs that don't use the current WPMU site's primary domain name which possibly means they are "WPMU ...
1
vote
2answers
4k views

When moving a WP site, why does wp-admin redirect to old site?

I am in the process of moving a WP site from one host to another. I copied the database and all the files, created a new database and imported the old one. I then changed the wp-config file. The home ...
1
vote
1answer
56 views

Images not working using Featured post

I have recently moved a wordpress website abc.com to xyz.com, And xyz.com functionality is good and working well. And i have created a post with a image in it using Featured Image, and when i publish ...
1
vote
3answers
180 views

Putting my site live

Can anyone help? I've been building a wordpress site in a sub directory of an umbrella 'development domain' if you will, and am ready to go live with the site. It's a single install of wordpress. ...
1
vote
1answer
59 views

What does $scheme in site_url function do?

Could someone tell me what the $scheme precisely does in the site_url function? What does it provide and how to use it? Of course I have read the Codex, but since I am not a native English speaker, ...
1
vote
1answer
76 views

Changing Wordpress blog name and web address

I created a self-hosted WordPress blog (on Dreamhost) several years ago. I've never truly been happy with the name and URL/domain of the blog, and I've decided that I want to change it. Here's what ...
1
vote
1answer
158 views

What do the schemes login, login_post, admin, and relative mean?

site_url and get_site_url accept a parameter named $scheme. $scheme can be set to http, https, login, login_post, admin or relative. http and https are obvious. What do login, login_post, admin and ...
1
vote
3answers
185 views

Override Wordpress theme url

I have a site where I used http://example.com, but if I change my site URL to http://example.co.uk or http://examplesite.co.uk which are all same site. If I changed anything in the above urls it ...
1
vote
2answers
522 views

Not Found (404) error on admin page, CSS gone on blog

I manually installed wordpress on my server and the wordpress files are located in "www.mydomain.com/wordpress/", however I wanted my "www.mydomain.com" to be the address for my wordpress blog instead ...
1
vote
4answers
748 views

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. ...
1
vote
3answers
220 views

How to use a custom domain?

I recently created a ProPhotoBlog using WordPress for my photography business. I have been unable to successfully use my custom domain name with the new site. When I change both the Site URL and the ...
1
vote
1answer
5k views

How to get the true permalink of the static home page?

I asked a very similar question earlier today (http://wordpress.stackexchange.com/questions/30392/how-to-get-the-original-post-id-of-a-static-home-page) and thought I had the answer, but now it ...
1
vote
2answers
532 views

How do I retain url parameters the entire time a user browses my site?

We have customers that come from other sites and I would like to retain a url parameter /?lead=openeye throughout the time that they're browsing. That way when they fill out a form I can capture the ...
1
vote
1answer
1k views

Changing siteurl and homeurl - internal links redirect to home page?

My new site was initially set up with an IP address (say http://123.123.12.12/). I later changed the siteurl and homeurl to my domain (say xyz.com). I also pointed the domain to the IP address so I ...
1
vote
2answers
21 views

Avoid the removal of “https:” from URLs

Wordpress is changing all my urls from "https://www.example.com/..." to "//www.example.com/..." for example: <link rel="canonical" href="//www.example.com/"/> I don't want this to happen, ...
1
vote
0answers
11 views

WordPress: how to change URL for individual MultiSites?

Currently we have a MultiSite setup for our main website, and the URL's appear as follows: http://sub.domain.com/site-a (Site A) http://sub.domain.com/site-b (Site B) Site A is OK as is. But we ...
1
vote
0answers
20 views

A URL that links specifically to the mobile version of my site?

I (due to my participation in a certain ad network) need to provide (for a certain ad box) a link that specifically shows the mobile version of my site -- regardless of what device I actually am ...
1
vote
0answers
47 views

How can I remove the folder from a Multisite URL?

I necessarily have a multisite installation in a subfolder. For most of the Sites this is fine, but I would like to remove that folder entirely for another Site. Like so: ...
1
vote
0answers
21 views

Session Expired when WordPress Address (URL) and Site Address (URL) are different

I followed this article to allow me to put our company's WordPress blog on a subdirectory of our Heroku hosted site: http://nicolasmlv.com/wordpress-in-your-rails-app/ This says to add this code to ...
1
vote
0answers
16 views

Dynamically update Site/Wordpress Address

Is anyone aware of a PHP method to use the linux server's currently assigned IP address as the Wordpress Address and Site Address? I'm not too worried about breaking the site, because it's ...
1
vote
0answers
53 views

get_template_directory_uri not dependent on WP_HOME in wp-config.php?

For testing on mobile devices in my local network, I've set up xip.io according to this blogpost I can access the site, but even though I added the following to my wp-config.php define('WP_HOME', ...
1
vote
3answers
52 views

Confusion about Site url and directory

I have installed my wordpress in root/mysubfolder so my standard path is example1.com/mysubfolder (example1.com is the domain i have registered the webspace with) Now i want the wordpress ...
1
vote
1answer
102 views

blog url redirecting

I used to host a word press blog and a forum on a server (srv71) with a domain name. And a few days ago I transferred my whole site to a new server (srv14) but I havn't updated my dns and I've ...
1
vote
1answer
325 views

Trailing slash results in an error:

On my website, any trailing slash is resulting in an error. How do I fix this? Example: http://example.com/content - no error http://example.com/content/ - error
0
votes
1answer
404 views

Hard code a domain into Yoast SEO canonical URLs

For various reasons, I've been asked to duplicate a wordpress blog across multiple subdomains. Obviously, this will cause duplicate content issues, which I hope to mitigate with the use of a canonical ...
0
votes
2answers
2k views

Changing my site url from azure.net to custom domain

I have created a WordPress site using Azure so when the site went live the url was http://apidublin.azurewebsites.net/. I changed this to http://www.apidublin.com/ using my domain hosting site and ...
0
votes
1answer
75 views

Why is a wordpress login session limited to one domain

I have a wordpress installation on my virtual host, where the document root is accessible as both "somesite.com" as well as "www.somesite.com". If I set up site_url as "http://somesite.com", then when ...
0
votes
4answers
111 views

problem with guid, when i change the folder name

I'm new to WordPress. I started the site as good with folder name wordpress. After I changed the folder name from wordpress to test. And also change the siteurl from http://localhost/wordpress to ...
0
votes
1answer
382 views

How to get_template_directory() properly on local environment

I'm currently developing a site locally in MAMP PRO. When I use get_template_directory() inside of the standard functions.php file, the site path gets output correctly. However, I have a separate ...
0
votes
3answers
179 views

Changing the color scheme based on the url visited

I am battling with the following: $themeId = ""; $pathname = get_site_url(); if($pathname == 'domain2.com'){ $themeId = "gold";} else{ $themeId = "blue";} ...
0
votes
1answer
842 views

(How) Can I change my Multisite Network to use a different blog as Primary?

Here's my basic setup: http://my.domain.com/ - The "primary blog" or "Network" http://my.domain.com/blogone/ - A sub-site or "blog" http://my.domain.com/blogtwo/ - Same, obviously ...
0
votes
2answers
1k views

URL rewriting for WordPress Network (Multisite) subsite

We have an install of WordPress Network (Multisite) that has multiple blogs running under the url blogs.exampleurl.com where each subsite is blogs.exampleurl.com/site1 /site2 etc... We have a user ...
0
votes
1answer
26 views

How to make tag pages look as /tags/%tagname%/ in the URL?

Example Tag's page, which involves all blog posts tagged with it, resides at /example-tag/ which is problematic for me since a post titled Example Post has the URL extension /example-title/. How can ...
0
votes
1answer
171 views

Change homepage url

is there any way how to achieve this? I've tried to google it, but I have no clue how to call it. siteurl.com - for whole web siteurl.com/news - homepage with news When I add siteurl.com I have to ...