I have a Wordpress site with hostagator web hosting , I am buying new domain and want to use new domain for site but same existing developed site. How to backup existing site and then restore to new domain ?
Solution is here
after searching a lot i got one simple solution.
Using Duplicator plugins or any other tool is either difficult or paid.
My simple solution is as follows
Backup and download all data from public html folder
Download the SQL database associated with the wordpress site.(in phpMyadmin you will find option of export database.)
Now upload the same files of public html folder to the public html folder of new hosting.
create a database with same name and import the tables from the downloaded SQL database.(in phpMyadmin you will find option of import.)
Now check the site if the domain is not changed
If you are changing domain name too by keeping the website same you need to follow few more steps
Download and place the interconnet/it tool in public html folder and follow the steps in documentation to use this tool.
case1- you are transferring site from one domain to another
if you are transferring from abc.com to xyz.com ins search and replace tool replace abc.com string with xyz.com .
case2- if you are changing the names only in website
if you are keeping the domain same but changing name of site e.g. ABC Technologies to XYZ technologies . Then replace ABC to XYZ
You can use this tool as per your need as it is applicable for database too.
There are a lot of ways of doing that. You can search a lot of materials on Internet but I would advise you to use this tool because I used in the past and it's reliable and very straightforward.
It is called Duplicator and is a wordpress plugin solution:
https://wordpress.org/plugins/duplicator/
Consider to maintain your site active until your new site is working properly. I hope I could help you. Regards.
Just install WP migrate db plug-in in your current website. And export the database with your new URL. Then create a new database in your server and import the updated SQL file. Then edit your config.php with new database details. Finally point your new domian to this server
**should take complete backup (both files and databse) before making the above changes **
Here I will explain how to take back up manually and restore manually on another server with other domain name.
Backup: You need to take back up of site and database.
For site, you can take only back up of wp-content. It contains all data you need to resore.
STEP1 : cpanel-file manager-public html- (wp-content)- compress & save- export or
download zip file.
For database: phpmyadmin -> export databse. This gives you localhost.sql file.
These two files one .zip file and another .sql file are your back up.
(It is good to remember user id password of wordpress dashboard of this one)
Restore in another server on another domain:
After you get you new domain dns propagated on new server, open its cpanel.
Run wordpress script , see database name it is creating.
1) database restore:
MyphpAdmin->Database created by wordpress->check all tables->drop all tables.
Now your database is clean without any table.
In your loacalhost.sql file remove two piece of codes:
a)any signature like this (it should be on top)
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
-- Host: localhost:3306
-- Generation Time: Oct 14, 2019 at 09:45 PM
-- Server version: 5.6.45
-- PHP Version: 7.2.7
b) Code prompting creating a new database like this:
-- Database: soniasin_fitfoody
CREATE DATABASE IF NOT EXISTS soniasin_fitfoody DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE soniasin_fitfoody;
-->Now, go to import and import, select your back up .sql file-> go. It will import all tables in your this database.
--> There is a database table now like wp_option, go there & edit siteurl (keep your new domain name), home (keep your new domain name) and admin email id.Very important.
Site Restoration:
1) Go to public html folder. Remove directory wp-content.
2) Import your back .zip file here and unzip.
3) You will find on wp-config.php file in public html folder, open it and update table prefix.
$table_prefix = 'wp_'; Here yo have to see what is your table prefix. Check database tables and see what prefix is in all tables. Here in this example it was 'wp_' , therefore kept it.
4) Now log in to you wordpress dashboard. It will take username of old site now and should take old password too. In case you forget password, change it and then open. Now wordpress will confirm that your database is changed, say ok and proceed.
Your site should be running on new URL now on another server.
In case of doubt, you ask me. If one want to watch any video here goes the link https://youtu.be/wROa37k_RQA.
Related
I have recently taken my first programming project and it is with word press, I have never used it before as I have only done hard coding HTML/CSS before. My client has given me all of the files of her site, how do I run this on wordpress. I have installed wordpress and can run the test123 site but when I do the same thing on the local server with the info she gave me then I get a "Error establishing a database connection". This is surprising because all of the file folders in the info she gave me is the same as the test site (obv the content is different). She was doing it on a mac and I am on windows but I assume that hsouldn't matter. How can I fix this so I can see the site on wordpress and make the required changes that she wanted.
Thanks!
I tried changing the config file but that just gives me the setup again and not the site she has already made :(
First, create a folder into your htdocs folder with name test123
now put all the directory which one provide you by client in to test123 folder like wp-admin , wp-content ....etc
after then in new tab run this path
http://localhost/phpmyadmin/
Create a database with name something test , then import the database which one provide to you by your client , after import go to table name wp-options and change the site url http://localhost/test123 same for admin URL
Now back to your files and open wp-config.php file from your test123 folder root directory , change database name which one you recently created "test"
username set to "root" and password "blank" hostname should be "localhost"
now run path in to URL http://localhost/test123
after this if you want to login http://localhost/test123/wp-admin
then first you need to change user password with md5 strings from database wp-user table
the site will work on localhost
Here some change for wordpress project on host to other host .
in your sql file change host name example
to change
http://localhost
after change to your config file details.
installation WordPress in wamp server
first, start wamp server
click to start all services when it will work the icon will be colored green
Go to C:\wamp\www and paste WordPress folder there. You can rename the WordPress folder to anything you want for example test123
Now open a web browser and go to:
http://localhost/test123/
it will ask you for database connection error
now open the phpmyadmin as showing into create
a database and import the database
then go to you Wordpress folder test123 and find the wp-config.php file and replace your username with "root" database name you created , and password blank . now run http://localhost/test123/ once again
if not work then please come to chat box room.
I want to know that is it possible to crate a web site on different local servers and after that collect all data to another local server for final version control
it is possible dude, please follow steps.
Step 1:- download whole data base in local server
step 2:- open that file in notepad and find current local site url and
Replace to all new site url.
Step 3:- import that database file to new server
Step4:- go to word press admin site and change permalink.
Ex:- old site utl is www.oldsite.com
new site is www.newsite.com
1:- download to old site database
2:- open on notepad Replace all site url www.oldsite.com to www.newsite.com and site that file
3:- import that file to new local database
4) go to wordpress admin and change permalink setting
enjoy i hope it's working for you. :)
I am copying my site The Sydney Visitor to the subdomain new.thesydneyvisitor.com. The reason is that i want to change the design while my old site is still active.
What I have done so far:
Copied all the files to the sub-domain directory using ftp.
Created a new database
Exported the old site database and imported it to the new database
Edited the wp-config file (in the subdomain directory) to point to the new database
Updated the wp-options table to reflect the url change
Run this query to update the URL change in the posts
UPDATE wp_posts SET guid = replace(guid,'http://www.thesydneyvisitor.com','http://www.new.thesydneyvisitor.com');
The problem:
After doing all these when I try accessing the site using the subdomain url I get the following errors:
Warning: require(/home/rapidtem/public_html/new/wp-includes/load.php) [function.require]: failed to open stream: No such file or directory in /home/rapidtem/public_html/new/wp-settings.php on line 21
Fatal error: require() [function.require]: Failed opening required '/home/rapidtem/public_html/new/wp-includes/load.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/rapidtem/public_html/new/wp-settings.php on line 21
Kindly assist. I am stuck.
Thanks in advance
Double check the following things.
Properly configured the sub-domain directory.
Copied all the wordpress files to the new directory. (I prefer zip the wordpress folder and upload to the new place to avoid any file loss)
Correct database names given in wp-config.php
The new directory has the read/write permissions (Check is it a password protected folder or not)
If everything above is fine, then the problem will be in your new database.
Instead of running a query to update the URL change in the posts do the following steps:
Goto wp-options table and edit the site_url ( at 1st row), home (around 39th row ) and upload_path ( atround 58th row).
Here is a detailed tutorial How to move wordpress to a new server or host.
There are some plugin available to do these search and replace in database. Check this one
Have you checked the referenced files exist in those locations?
Did you change the Home and Site URL from the Wordpress Database?
We're currently rebranding a client of ours and it's come the time to take the new brand to their website.
I've not much experience with Drupal other than the theming (I've themed a Drupal website in the past but not very familiar with the software's inner workings).
As this website is live, it's obviously not feasible for me to make any changes to the live environment, so I have downloaded the source files of the website to a local webserver (MAMP).
I also have a MySQL dump of the database.
I'm not sure what files need to be changed inside Drupal to allow access to the MAMP webserver. Could somebody point me in the right direction here?
How would I connect the database to the website, which files need modification?
I think the client is running Drupal 6.
Update:
I've installed the database and linked it up using the below line:
$db_url = 'mysql://root#localhost/databasename';
I've hidden databasename for anonymity.
As it's MAMP, the database has no password. When I load up the website I get an error that install.php is not found. It's not there because the website is already 'installed'.
I've also updated the $base_url to read:
$base_url = 'http://localhost:8888/foldername';
You only need to modify one file, 'sites/default/settings.php'; you'll just need to change the database connection string in there to match your new database settings. There may be a couple of other settings in there you need to tweak depending on the set up of the site (for example the $base_url or $cookie_domain).
Other than that everything in your installation should be relatively path-ed so there shouldn't be any need to make more changes.
i was facing same problem after couple of hours try i got solution : we have to check the DB (tick on list of databases in local host) [ observe this after DB list : Enabling the database statistics here might cause heavy traffic between the web server and the MySQL server. so enable only the db you want to use] this will redirect to http://localhost:8888/foldername/install.php successfully :D :D
I am trying to create an identical wordpress website - on the same server. I need to create this as a testing environment but every time I try to duplicate the site it breaks. Is there an easy way to create a testing environment, of the live site, on the same server while keeping all of the same widgets, plugins and content?
I am an experienced web developer but a novice when it comes to Word Press.
I appreciate the help.
In my experience the following usually works:
Setup your prod site
Copy all files to the test site
Modify the wp-config settings as needed, and create the test db schema
Export all the data from the prod site control panel and import into the test site
The problem is that while you have all the files identically, your database contains all the configuration information for the live site. You'll need to copy the database from live to your development/testing server. You can run an export on the SQL and import the data into a new database. Then modify the wordpress/wp-config.php file in your development site to connect to the new copied database.
Additionally, you'll want to go through the new copied database, table: wp_options and change the site URL to match the development site/server instead of the live server.
Some default fields you'll want to change are:
option_name: home
option_name: siteurl
As well as fields installed by plugins that contain your site URL and path.
Create a directory for the testing.
Backup the original database, and
create another one (you may use the
same db user/pass if you like).
Execute the SQL file from the backup (at the test database)
Edit the wp-config.php.
(Test Database) Update the URL at the (your prefix)_options table. It's the very first value with the option name: siteurl
Done.