Wordpress 3.0.3. How To Change Main Site - wordpress

I have moved a WPMu site to a new host, and upgraded to WP 3.0.3. Things are going pretty easy, except the previous website had a different URL as the main website installation. Now that I have moved the install, I don't need the previous URL as the main site but need to make a new URl as the main site. Where do I go about changing this? I've changed the entire database by changing the previous URL to the new URL, and the wp-config is set up correctly with new URL and htaccess has no mention of it. I'm running out of places to look on where to change the URL.
Any advice/help would be greatly appreciated.

Steps to change site URL in Wordpress
Replace new site url with old site url in exported database sql file (use Notepad++ for fast search and replace)
Change site url in wp-config file
Change database information (db name, host, username, password) in wp-config file
Change site url in .htaccess file

Related

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

Moving WordPress from subdomain to main domain

I’ve read the WordPress Codex instructions regarding moving WordPress, but none of the information provided seems to apply to my exact situation and I have a couple of questions before I go and break things.
I have a main domain on which my old wordpress site is currently running (e.g - example.com) I wanted to change the layout of the website but at the same time wanted to keep my main site running so made a subdomain (beta.example.com) and created my new wordpress website on this.
Now I want to make my beta website the main website (i.e make beta.example as example.com) and remove the main website, how do I go about that?
I am using cpanel and both my folders are in the public html directory
Thanks in advance.
Step 1: Backup: Always backup the files / database of the site(s) you choose to work with
Step 2: Move files: Delete the contents of example.com's document root and move the contents of blog.example.com to example.com
Step3: Change home/site-url: The daabase mght have other hard coded urls too. So changing the home / site url alone will not be enough and a full database search-replace is needed.
I would not recommend using notepad++ or any text editor to change the website url as it has a great chance to break the layout of the website and I have seen it may times happen. I always use and recommend you to use the Database Search and Replace Script from here
Download the version 2.1.0 to the document root of the website as search.php
Now call the script via your browser (as domain.com/search.php). The script autopopulates the database details. The rest of the instructions there are self explanatory to follow.
Step 4: Finishing up: Check the .htaccess file that there are no redirects to the blog.example or similar redirects. If yes, remove them and replace with the default .htaccess wordpress rules.
That should do it.
Steps are below:-
Make a new folder into your root in Cpanel and move your old domain(example.com) files to the new folder as a backup
Move your subdomain (beta.example.com)folder's files into root in cpanel
rename your ht access file it will automatically created when your WordPress run into the browser.
Into your PHPMyAdmin create new database (like new_database)
Download your subdomain database and open it into editor something (like notpad++)
Into notpad++ press crt+f, from tabs click to replace, into find section put beta.example.com and into replace with section put example.com then save it make sure you do not use HTTP, https or www when performing the replacing task.
Now goto your WordPress directory wp-config file and change your database name with newly created one username and password too.
Visit example.com/wp-admin login there with your login details you were using to login into beta.example.com/wp-admin.
Into deshboard->setting click to permalinks and select %%postname%%
Thanks, I hopes it will work for you as example.com

Wordpress redirection loop

Where can I change manually the website url that is in Settings>General
in wordpress panel?
I have an issue.
I had one wordpress website in the url
79.170.40.53/theffashioneditor.com/test1/
and i wanted to transfer it to
tfeditor.com/test1/
So i packed the files from first domain server
and unpacked them to the second domain server
also did with the DB. Changed the wp-config.php with the new DB user pass and database.
Then when i tried to go to the "tfeditor.com/test1/"
it redirected me to the previous server.
I went to the previous wp admin panel and changed the HOME and URL to the new domain name "tfeditor.com"
and now im in a redirect loop whenever i want to go to tfeditor.com/test1/wp-admin it takes me to the previous domain with this path
http://79.170.40.53/theffashioneditor.com/test1/wp-login.php?redirect_to=http%3A%2F%2Fwww.tfeditor.com%2Ftest1%2Fwp-admin%2F&reauth=1
I login with my username and then it takes me to
http://79.170.40.53/theffashioneditor.com/test1/79.170.40.53/theffashioneditor.com/test1/wp-admin/
Someone can help me with this please?
As I wrote here.
Simple checklist for wordpress migration is:
edit database table wp-options and options siteurl and home there
edit wp-config.php (DB_NAME, DB_USER, DB_PASSWORD a DB_HOST)
use this replace script to replace all other occurences of absolute paths for relative path, it is enough to replace your old site name http://yoursite.com with an "/"

Wordpress - Moving website admin section

I have successfully moved a wordpress site from /test directory to the root, so now the website url looks like www.example.com. Fine.
However the admin section (wp-admin) still points to /test directory and so the url looks like www.example.com/test/wp-admin/...
How can I make it like www.example.com/wp-admin/...?
Please notice that I'm not interested in a simple redirection (now the customer is able to access the admin section with www.example.com/wp-admin, but then he's redirected to www.example.com/test/wp-admin/..., and it's not what he wants.
Thanks in advance
Everything is documented in http://codex.wordpress.org/Moving_WordPress
You may need to change many URLs in post/page content; if so, see https://github.com/interconnectit/Search-Replace-DB as suggested in the above Docs.
There is no need to create a new Wordpress install.
Also see http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install if you want to keep core Wordpress files and folders in a subfolder, but have the site appear to be at root for the end user.
You should not move wordpress this way. Here is what you do:
Install Clean Wordpress Installation on the new domain.
(www.original.com)
Use a plugin* to make back-up on your test domain.
(www.original.com/test/)
Install plugin* on the new domain, and restore back-up from test
domain. (www.orignal.com)
Update your style.css, header.php, index.php & footer.php if it
contains hard written links to your test domain.
You cannot simply move a wordpress installation - as most entries, links etc. are stored in the database. If you move folders in your ftp they will still point to the old database. This is why you have to duplicate your site, where the database entries will be automatically updated to your new site domain. Hard written links in any theme php files will have to be updated.
Although your problem depends on how your pointers/sites are set-up in c-panel. If you have to change pointers for your directory, you might have to back-up your website and upload it to a different domain so your new site can access the restoration back-up file via http request.
*Plugins such as wp clone, duplicator.

wordpress: domain mapping and site URL display

i am a wordpress newbie and have not much experience with their settings. Basically, i have recently set up a domain mapping for an existing wordpress site that i took over and that i had to move to another host, so domain mapping seemed to be an easy option to point the old URL to the new host. I have set up the domain mapping to point to the new site from:
http://www.myOldExample.com
to the new one:
http://www.myNewWebsite.com/foldername
So far the content migration worked in wordpress. The problem is that when i type in the old URL in the browser, it redirects the old page and shows the new site for the main home section as expected, but for all the subsequent links such as About, Contact, Products etc. it shows the new URL with the subfolder path, whereas i would like them to display the old URL as the base URL, so i am not sure if i need to change anything on the domain mapping site, or does this need to be done on the wordpress side? Does wordpress offer something like a base URL rewrite? I could only find in the general settings the Site URL and Wordpress URL, but i am not sure if changing those values to point to the old URL would break the site.
Many thanks for any ideas.
I think, this is url problem. When you are migrating wordpress site from one server to another server or same server but different folder, so its create url problem like http: //theoldserver to, for example, http: //thenewserver.com is problematic. So download file from this site and put this file, where blog files placed on server. Then do step, which define on this url.
This is very handy tool
Search and Replace for WordPress Databases Script" tool that's very handy (make sure to read the instructions and have a backup of the db before using it).

Resources