Questions tagged [site-url]

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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
31 views

Why does using different URLs in WordPress settings cause a "Publishing failed, you are offline" error?

In the WordPress General > Settings, when we update the WordPress address and the Site address to two different URLs We're not able to update/create posts. It is throwing an error saying "...
joshwinny's user avatar
0 votes
0 answers
18 views

Changed URL: refused to connect

Hope someone can help me, just changed the URL of my site from http://radius7.co.uk to http://kendricks.life and the site and wordpress editor fails to load and just displays "refused to connect&...
Mark's user avatar
  • 1
0 votes
0 answers
189 views

Replace the "wp-admin" in the URL with "xyz-admin" in WordPress dashboard

I want to replace the "wp-admin" in my URL with "xyz-admin" all across my dashboard after a user logs in. I know that there are some plugins that could help, but those plugins only ...
Programming Geek's user avatar
0 votes
1 answer
21 views

How to change the default location where new post gets stored?

Traditionally, in WordPress after we write a new post it is stored in the location (URL) as followed: www.mysite.com / best-headphones-of-2023 But what if we want to store that new post after one more ...
Aritra Dutta's user avatar
0 votes
0 answers
24 views

WordPress is adding pagination for all pages like www.example.com/page/123. How to remove that?

I think WordPress is adding pagination for all pages like www.example.com/page/1234. In my case, it is adding for all pages not only for the blog page. How to remove the pagination for pages in ...
Murali Krishna P's user avatar
0 votes
1 answer
484 views

Is there a way to append a trailing slash to get_home_url() and get_permalink( get_option( 'page_for_posts' ) )?

Both get_home_url() and get_permalink( get_option( 'page_for_posts' ) ) don't append a trailing slash at the end. Is there a way to append it similar to home_url( '/' ) other than get_home_url() . '/'?...
Motivated's user avatar
  • 205
0 votes
0 answers
133 views

How can you change the admin dashboard URL without symlinking?

I'm interested in changing the WordPress admin dashboard URL without using a third-party plugin. NOTE: I know that 'security by obscurity' is not the best security measure; I plan on using other ...
Ichi's user avatar
  • 1
0 votes
1 answer
199 views

Changing siteurl in the database not working

I'm trying to change siteurl and home in the database, but whenever I try to change after 5 seconds they automatically change back to the previous url. Is it related to the server?
xdev's user avatar
  • 13
0 votes
0 answers
31 views

How to access wordpress from domainB which is installed at domainA

Use Case: I am setting up wordpress for one of my clients. The wordpress is setup at a domain like http://cms.domainA.com. This domain is on VPN which can only be accessed by using VPN and few ...
Sunil Chaudhary's user avatar
1 vote
1 answer
2k views

Get the URL of the page from which an ajax request has been launched within ajax callback

I'm calling a server-side function written in PHP via wp-ajax. The server-side function eventually redirects to another page for an authentication step, and then redirects back to the initially shown ...
DevelJoe's user avatar
  • 487
0 votes
0 answers
96 views

Colon is Missing In My Website Url in Wordpress Shortcode

So I've had this shortcode [site_url] working fine until a few days ago, now as I'm trying to use it again and it shows me a https// instead of https://. I've tried using this function: //Website URL ...
Alex P's user avatar
  • 1
0 votes
1 answer
33 views

How to stage a redesigned site on a new webhost while the original site is still live? [closed]

thanks in advance for any advice! My client has a live site currently hosted on GoDaddy. I am developing a redesigned site for him on Local. I don't like working on GoDaddy and have advised him to ...
criz p. critter's user avatar
0 votes
1 answer
281 views

Wordpress is adding "category" word before my actual category name in url (and this is unsolicited)

Check out this image: This is twenty twenty theme, a default theme. I started facing the problem with a non-default theme, so I switched over to this other theme just for testing, same thing. What's ...
Brave Warrior's user avatar
0 votes
1 answer
68 views

Is bloginfo('template_directory') generated based on WP_SITEURL and WP_HOME in the settings?

In my theme, many URLs are generated based on bloginfo('template_directory'), for example, below is a snippet in the header <link rel="apple-touch-icon" sizes="64x64" href=&...
alancc's user avatar
  • 41
0 votes
0 answers
37 views

Add www to the Root Site in WP Multisite Network

I have a WordPress (Latest version) based website with Multisite Network Enabled. For example, the domain is example.com. So, my root site is example.com and my subsite is blog.example.com. But I want ...
Md. Ashraful Alam Shemul's user avatar
0 votes
1 answer
26 views

I changed the url from the setting then login panel not working

i made my whole website on word press my folder name is "pti" and database name also is "pti". at the end i went to the setting by mistake and change the url from "pti" ...
arsalan sharif's user avatar
0 votes
1 answer
83 views

WP returns to domain root instead of siteurl

On various admin actions (e.g. delete a post), my fresh WP install (dev.mydomain.com/website) returns to the domain root (dev.mydomain.com) instead of dev.mydomain.com/website/wp-admin/edit.php?some-...
Jos's user avatar
  • 426
0 votes
0 answers
24 views

Multisite problem with unexisting paths to CSS etc

I have the multisite Wordpress site: domain.com/siteA domain.com/siteB Now when the post is published on main site (domain.com), it looks fine because bunch of resources are OK path: https://domain....
Dalibor's user avatar
  • 101
0 votes
1 answer
110 views

How to bulk Update URLs to new values?

How to bulk update 50 posts with old URL=https://bkfast.vn/san-pham/thiet-bi-trong-rau-sach-thuy-canh-bkfast/ to new URL=https://bkfast.vn/bo-trong-rau-thuy-canh/ ? Tks in adv,
VietKim's user avatar
0 votes
1 answer
39 views

Redirect htaccess [closed]

I need to help with redirect my page. For example I have websites https://example.com. I need to move content from https://example.com to https://example.com/blog. That is not problem and I do that ...
Silmarion's user avatar
0 votes
1 answer
126 views

How to rename a wordpress site from http://myserver.example.com/blog to http://myserver.example.com/somethingelse or just http://myserver.example.com

I've followed https://ubuntu.com/tutorials/install-and-configure-wordpress to install and configure wordpress on an Ubuntu 20.04 machine. I can access the example site at .../blog and administer it ...
Perplexed's user avatar
0 votes
1 answer
18 views

Deleting /wp from my website URL

I'm newby in creating websites and I have the following case... My website was working only on url Makai.pl/wp if i would enter Makai.pl there would be my hosting site. I'v tried to move all the ...
Piotr's user avatar
  • 1
1 vote
3 answers
2k views

How do I get the site url from a Block (within the block editor)

I have a block in which I'd like to display a link based on the site url. So for example, when the user enters "Futuristic", the link will display as https://my-site.com/futuristic/ I've ...
JakeParis's user avatar
  • 653
1 vote
1 answer
484 views

How to Create a Staging Site / Changing URL

We have a WordPress site hosted in a basic cPanel environment. I can create a duplicate of the website and use the four I think it is suggested methods to change the URL. However I've noted in the ...
Simon's user avatar
  • 111
1 vote
1 answer
77 views

Remove / from www.example.com/ [closed]

Whenever I type my domain, example: www.example.com there is a forward slash that automatically appears in Firefox. Example: www.example.com/ How can I remove this?
user201299's user avatar
1 vote
0 answers
189 views

Force WordPress to load from site's hostname

I am looking for a WP php rule to always serve any webpage via the desired host without adding a redirect rule which is not an option in this case. see below. We have our main site on one server and a ...
Joel's user avatar
  • 61
2 votes
1 answer
1k views

Redirect main domain to subdirectory

Following the following code sample I managed to redirect it, however the site URL on the browser show as domain.com/subdirectory and not domain.com. public_html ROOT .htaccess RewriteEngine on ...
stemon's user avatar
  • 155
1 vote
1 answer
939 views

How to retrieve TLD domain for the current website?

WordPress has certain variables like site_url and home_url and paths for things like plugins, themes, uploads, etc... but it seems there is no easy way to display current TLD domain. This probably ...
Jesse Nickles's user avatar
0 votes
1 answer
827 views

How to generate expiring URL of the page?

I have a Wordpress site with sensitive private data and I email the link of the whole page to a client via email etc. How can I expire the link after 1 Session, So if a client opened the link to visit ...
JadoBulku's user avatar
0 votes
0 answers
20 views

How can I change block editors suggested links to display another url (i.e. from api.mysite to www.mysite)

This is potentially not a straightforward question in that its not a native WP installation. I use a JavaScript framework (Vue/Nuxt) on the frontend at www.mysite and WordPress is running from a ...
Ziggles's user avatar
0 votes
1 answer
103 views

SSL not working fine, Home url not matching with site url wordpress errors

I deployed WordPress through Bitnami so after adding an SSL certification I started getting warnings from my WordPress dashboard of my site URL not matching with Home URL I was directed to my ...
Francis's user avatar
0 votes
2 answers
129 views

Woocommerce different URL for every table placed in the restaurant

my company is working with different restaurants to digitize their menus so that people dont touch the menu cards in this Covid 19 pandemic, so every table in a restaurant will have a unique qr placed ...
Aetzad Asghar's user avatar
1 vote
1 answer
334 views

How to fix blocked cookies error that doesn't let me log into wp-admin?

I have edited functions.php file recently and also added a new folder to themes folder for custom endpoint and after that I wasn't able to login to wp-admin. I deleted the folder and code line from ...
Eglė Ged's user avatar
0 votes
1 answer
197 views

Why my URL has an unknown character string?

I'm working on a WordPress website which contains an unknown string of characters behind the actual URL (/?v=11aedd0e4327). I've tried deactivating all the plugins, but nothing changed. I've also ...
Paul Maudry's user avatar
0 votes
0 answers
142 views

Plesk login inaccessible after changing site URL

I was initially facing this issue: (I am locked out of my WordPress site after changing site URL from Http to Https). I need to access wp-config to implement the given solution and was trying to ...
Bhavika Khare's user avatar
1 vote
0 answers
36 views

Wordpress Multi-Site on Ubuntu 18.04 LAMP Keeps Re-Directing

After a few weeks of head banging... I am very near to completing a local development environment for my WP Multi-Site Installation. The final problem that I have (wishful thinking), is that the ...
mjones's user avatar
  • 153
0 votes
2 answers
999 views

Wordpress get parameter 'unapproved' and 'moderation-hash'

I have a blog site. And I found a suspicious access to my blog post from log. The url format is like this. https://example.com/my-post/?unapproved=420&moderation-hash=...
devcrazy's user avatar
  • 101
0 votes
1 answer
630 views

Hide Wordpress Site URL from Source Code

How to hide the leading site url from the source code example http://example.com/wp-content/themes/themename/style.css Becomes /wp-content/themes/themename/style.css Removing the main site URL ...
David Buik's user avatar
0 votes
1 answer
215 views

I changed the site address and wordpress address from localhost to my ip and it doesn't work anymore

The problem: I'm running wordpress locally on a mac using mamp. I used to access my wordpress site with localhost:8888/mysite. I wanted to let other people see it using my IP address so I went under ...
Masiar's user avatar
  • 113
0 votes
1 answer
594 views

How to return site_url() without https://

I am retrieving the site URL and creating a shortcode to display it. However when i return the site URL as expected it contains the full string including https:// How can i return the site url ...
Patrick's user avatar
  • 295
0 votes
1 answer
309 views

How set a custom URL for a new theme file in WP?

I want to create a new theme file in wordpress. for example : index111.php And I want to copy all the contents of one of the main template files (for example : index.php) into the new file (index111....
sizdah's user avatar
  • 3
1 vote
0 answers
103 views

How to bulk edit image url in featured image and product description?

I have tried a few plugins (free) but none update the url in featured product image and product descriptions. How can I update in bulk instead of doing one by one? If there any any plugin (...
Organic Heart's user avatar
0 votes
1 answer
225 views

Permalink not changing according to post type

I am using two post types: a) Posts ( Default post type) also name as blog for blogging. b) case studies ( Custom Post Type ) only for case studies. I want to add the string ‘blog’ for default post ...
Wasif Mumtaz's user avatar
0 votes
0 answers
31 views

Got 404 error when changed siteurl via DB in Wordpress

The problem is that I have changed the wp_options table with site URL and home fields from http://localhost/WordPress to http://localhost/test I get 404 errors or Object not found error. What I ...
Antony Lapitskiy's user avatar
1 vote
1 answer
1k views

How to set "Site Address (URL)" programmatically on WP multisite?

I have a new WP multisite configured to use subdomains by default. Network sites are created programmatically when the user signs up. I want to give the user the option to enter a custom domain and ...
Kirkland's user avatar
  • 298
0 votes
1 answer
370 views

Querystring value being stripped from site_url()

This is a question about a plugin. A form to search the database works. What I am trying to do is have the search term reload into the form input field when returning search results. The problem is ...
Steve's user avatar
  • 277
1 vote
0 answers
330 views

Domain not redirected correctly with Wordpress Multisite

My Wordpress multisite installation uses two sites: Site 1: www.myexample.com Site 2: blog.myexample.com In addition, I own a second domain myexample2.com, which I would like to redirect to the ...
Peter Gerhat's user avatar
1 vote
1 answer
2k views

How to use site_url() in Elementor [closed]

I have created a website in wordpress, which is currently running as sub domain of a company. This website contains large number of pdf documents, which are belongs to different categories. The pdf'...
Agreesh V S's user avatar
0 votes
1 answer
92 views

Include www prefix in site URL

I'm setting up my first wordpress site (on a WP Multisite server). In the 'sites' info page I am asked to enter the site URL. Should I use 'www.mydomain.com' or 'mydomain.com' ? (Does it matter?) ...
TSG's user avatar
  • 105
1 vote
2 answers
509 views

Headless WordPress – Issue with plugin path

Working on my first decoupled site. Backend is handled by WordPress and lives on the subdomain admin.mydomain.com and the frontend lives at mydomain.com. The first issue I saw with the headless ...
INT's user avatar
  • 1,271

1
2 3 4 5