Change WordPress URL folder name to another without redirecting - wordpress

I'm trying to change my WordPress site's URL (without redirecting) from:
example.com/go/take/
to:
example.com/go/give/
Also, if my wordpress site is located in the /go/ folder, is it possible for me to trim /go/ ?
Thank you.

These are two separate issues.
Regarding the first issue, are you saying that you still want a user
to type in example.com/go/take, but be served the file from
example.com/go/give without changing the url? You can install the
wordpress redirection plugin to do that. You can create a 'pass
through' redirect which will do this.
Here's what you can do to run example.com from a wordpress install
in the go subdirectory:
http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

Related

Problem with url moving site from subdomain to main domain in Wordpress

Guys, I've a site that was moved from sub.domain.com to domain.com. To do this I used Backupbuddy plugin in Wordpress. The problem is..Everytime any user try to access to some old page url (domain.com/testpage) and the page doesn't exist, are being redirected to sub.domain.com/testpage where the page previously existed.
Any idea how to fix this?
Thank you.
you have to make change in your .htaccess file in your server or host. always redirects are in that file. if you are using cpanel you have to make visible hidden items in settings.
I think the first port of call would be to check the URL in Wordpress matches the database table URL, if so update the Permalinks and retest.
Zip .htaccess to make a backup and remove the .htaccess file. Then, save your permalink again to generate a new .htaccess and check.

domain redirecting to localhost/wordpress

this is my first time, I am installing a wodrpress localhost(xampp) to main server.
According to tutorial I Imported database from local machine to main server. Changed the the table prefix and http://localhost/wordpress to https://example.com.
after installing theme domain shows empty theme.
I changed all the http://localhost/wordpress used on theme. But didn't work.
Then according to another tutorial I imported full localhost wordpress file.
Then It redirecting my domain to http://localhost/wp-wordpress. Then I decided to fully reinstall the wordpress and as per I removed file from public html which I uploaded.
Now my domain redirecting to http://localhost/wp-wordpress after removing files I uploaded.Public html folder
my site
After reinstalling wordpress on server admin dashboard working fine but domain redirecting to localhost/wp-wordpress
You can change the url many ways in wordpress. You can use to change the url as you understand and follow the steps as I mentioned in below,
Change WordPress URL in Admin Dashboard
Change WordPress URL in wp-config.php File
Change WordPress URL Directly in Database
Change WordPress URL With WP-CLI
Get More understanding the details, Follow the article - How to Change Your WordPress URL
Thanks!
After checking wp-config.php and site_url,home_url in wp_options table in database. Take a view on .htaccess file too. This file should look like this htaccess code
Please change the site_url from the wp_option table. There are 2 rows containing the website base url in the wp_option table. You need to change both url to the main domain url.
Thank you

WordPress domain redirection

Beginner question:
I need to perform a 301 redirect from one Wordpress site (domain), to another Wordpress domain, like this:
From:
http://mycompany.com
To:
http://mycompany.se
A problem is that I have no FTP credentials for my From-site. I can't reach the .htaccess file.
Is there a plugin to use? I have studied the Redirection plugin, but this one seems working on pages within the same domain only(?)
I guess I need to be careful, because if some plugin edits the .htaccess file and something breaks, I can't reach the file...
Thankful for any help!
Whit Redirection Plugin you can redirect a url from old to new website.
You can create and manage redirects quickly and easily without needing Apache or Nginx knowledge. If your WordPress supports permalinks then you can use Redirection to redirect any URL.
There is full support for regular expressions so you can create redirect patterns to match any number of URLs.
The plugin can also be configured to monitor when post or page permalinks are changed and automatically create a redirect to the new URL.
You can easily find multiple plugins to perform 301 redirection in wordpress,but if you want to edit .htaccess you can install the plugin called "WP htaccess control" https://wordpress.org/plugins/wp-htaccess-control/ .
Through this plugin you can edit the .hraccess file from admin side.
Thanks.

Moving Wordpress site subdirectory errors

I have just moved my testing development subdirectory worpdress installation to my root folder using the WP-Clone plugin.
The problem now is my main site (previously mysite.com ) shows (mysite.com/site) now. and the subdirectory is shwoing in all my links
I have tried going to settings and removed the /site from wordpress URL and Site address URL.
But it broke my site and disabled me from accessing my wp-login.php .
I fixed it by editing my wp-config.php and adding :
define('WP_HOME','https://mysite.com/site');
define('WP_SITEURL','https://mysite.com/site');
and now my website works perfectly. But it still shows mysite.com/site and i am unable to edit my URL and Siteaddress from my wp dashboard anymore.
How do I Remove my website subdirectory (/site) and still have it work and not break my site's themes and all? How do I go about this? Really really appreciate any help! Thanks!
By adding those constants to wp-config.php you're overruling any setting in the database. That's why you can't edit them in the admin panel.
So the first step is to change those constants to:
define('WP_HOME','https://domain.com');
define('WP_SITEURL','https://domain.com');
Then delete your htaccess file. (.htaccess in your root folder).
Once you've done this navigate to http://domain.com/wp-login.php
Login to your site and go to Settings -> Permalinks. Hit save which will regenerate your htaccess file.
Finally you'll need to update existing links. I'd suggest installing a plugin called 'Velvet Blues Update URLs'.

Wordpress in same directory with default page

I think I'm needing help with .htaccess here.
I have a page that was named index.php. I still need that to be the default page but with a new name AND I need a wordpress install in the same root. So here's what I've done:
Renamed index.php to somethingelse.php
Created an .HTACCESS with this line in it: DirectoryIndex somethingelse.php
Now if I go to www.site.com it brings up the www.site.com/somethingelse.php page (as it should).
Next I installed Wordpress into the root. That went well too.
The problem is I cannot access wordpress via www.site.com/index.php when I do that it just kicks me back over to somethingelse.php page
I'm thinking there is something I need to add to .htaccess so that if:
1) Someone types www.site.com it goes to www.site.com/somethingelse.php
2) Someone types www.site.com/index.php it goes to the wordpress install
Just for clarity, the reason for this is that in about a week, somethingelse.php will go away and the wordpress install will be the live site.
Any help is appreciated
I fixed it by creating a separate page that only I can get to to set and destroy a cookie. then in the header.php of the WP file I check that cookie and determine where to go.

Resources