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
1answer
32 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 ...
0
votes
1answer
25 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 ...
4
votes
1answer
2k views

Site redirects to wrong url when saving settings

I have a subdomain: https://blog.example.com/ I forcibly redirects to subdirectory: https://www.example.com/blog By changing site URL and some RewriteRule on .htaccess. Now the website and admin ...
3
votes
5answers
15k 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
4answers
7k views

How to remove “http://” When Echoing URL?

I'm seeking to echo the domain name (url) without the 'http://' (or 'https://'). I've created the following: <?php $surl = bloginfo('url'); $findh = array( 'http://' ); $replace = ''; $outputh = ...
0
votes
2answers
301 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=...
1
vote
1answer
2k views

Remove HTTP: from the site URL and just keep // in it

I am building a website for my company which loads over HTTP inside the company and over HTTPS outside company's network. This is a compulsion and there is no way we can avoid it. The site needs to ...
0
votes
0answers
14 views

Wordpress Url post name comes first

I want to change my wordpress url from www.example.com/post to www.post/example.com post name comes before domain name.How we get that in Wordpress
0
votes
2answers
683 views

Wordpress URL not working?

I am using Wordpress, I have some URL issue. My current URL is IP address on server: http://www.192.10.1.22/states/?q=ohio I want URL: http://www.192.10.1.22/states/ohio I used following code in ...
4
votes
7answers
10k 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: test.example.com ...
0
votes
1answer
1k views

change home_url and site_url but don't redirect to home_url and site_url on load

I have two domains uat1.example.com and uat2.example.com pointing to same wordpress installation. I want to change the home_url and site_url for all links in the website to uat2.example.com, but it ...
0
votes
1answer
11 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 ...
0
votes
2answers
43 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 ...
1
vote
1answer
24 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 ...
1
vote
1answer
44 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?
1
vote
0answers
66 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 ...
0
votes
2answers
107 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 ...
1
vote
1answer
57 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 ...
0
votes
2answers
2k views

How to redirect the frontend of a WordPress site (only)?

I have a subdomain http://blog.example.com I would like to redirect it to subdirectory as https://www.example.com/blog But not admin(/wp-admin). Admin area should be as it is http://blog....
0
votes
0answers
11 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 ...
4
votes
6answers
11k views

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/...
1
vote
4answers
3k views

I don't see site_url and home_url fields in wp_options table (phpMyAdmin)?

I wanted to show you this issue. This is happening first time with me in my 10 years career, I have cloned many sites to another domain in past but this is for the first time when I do not see the "...
0
votes
1answer
206 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 ...
0
votes
0answers
16 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 ...
4
votes
1answer
3k views

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: <...
0
votes
0answers
10 views

How to remove weird characters added behind permalinks

I am new in using WordPress to create my own website, currently facing a problem with the weird characters added behind permalinks for each page such as http://www.officeconceptdesign.com/products/#....
3
votes
4answers
4k views

How to inject custom url path for page ?

Is it possible to make custom URL path for pages ? The current page url is http://localhost.dev/insight which I need to show like http://localhost.dev/city/local/insight are any option in wordpress ...
0
votes
2answers
87 views

My permalinks for all pages and posts now include old page titles as parents/categories

The permalink structure has changed with old entries as well as any new entry (post, object, etc) from THEN to NOW THEN: constructstudies.com/(page slug or object label) NOW: ...
0
votes
1answer
27 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 ...
0
votes
2answers
81 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 ...
1
vote
1answer
53 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 ...
0
votes
1answer
55 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 ...
0
votes
0answers
40 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 ...
1
vote
0answers
21 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 ...
0
votes
0answers
303 views

wordpress+docker+apache mod proxy redirects to http://localhost

My environment is, a docker container running wordpress on apache can be accessed via ip:port . The host environment has an apache instance which redirects traffic that comes to http://myurl to ...
16
votes
5answers
59k 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 ...
0
votes
3answers
1k views

Preventing Canonical Redirect for CDN

I want to run my entire WordPress site through a CDN to improve performance (HTML, not just static CSS/JS/media). Lets say the origin server is example.com and www.example.com is the URL where traffic ...
0
votes
1answer
260 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 ...
0
votes
1answer
13 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 ...
0
votes
1answer
34 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 ...
0
votes
1answer
38 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....
1
vote
0answers
28 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 (...
1
vote
1answer
432 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 ...
0
votes
1answer
117 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 ...
0
votes
0answers
30 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 ...
0
votes
2answers
531 views

Displays url's twice and getting 404 errors after activating

I have activated SSL to my site On my wordpress multisite, I am getting 404 errors when I am entering a correct url for example http://site.org/wp-admin it automatically redirecting and giving ...
0
votes
1answer
124 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 ...
1
vote
3answers
979 views

Wrong wp-admin URL

I freshly installed a WordPress site and I configured it behind a reverse proxy with site URL - http://example.com/hello Problem I can reach the admin dashboard page, however I cannot go further as ...
78
votes
6answers
117k 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. If my blog is hosted at http://example.com/blog then site_url() returns http://example.com/blog But then ...
1
vote
1answer
517 views

How to use site_url() in Elementor

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'...

1
2 3 4 5