Whether you are moving wordpress to a new server, or in a different location on your server, you do not need to re-install. WordPress is very flexible and can handle all of these situations.
Moving to a New Server
If you are using wordpress from one server to another, the first backup your wordpress directory, images, and other files on your web site, as well as in the database. Please refer to the wordpress backup, the backup database.
Keeping Your Domain Name and URLs
Move your domain, without having to change the home page and the URL of the web site, your wordpress website is very simple, and in most cases can be done by moving the files.
- If the database and the URL, you can move, you only need to copy your files and databases.
- If the name of the database or user changes, edit the wp-config.php with the correct values.
- If you want to test, switch, you must change the siteurl” and “Home Page”, in the database table wp Options (via phpmyadmin or similar).
- If you have any type of rewriting (permalinks) settings, you must disable the .htaccess and re-configure the permalinks, go online.
Changing Your Domain Name and URLs
To move a web site, and change your domain name or web address (i.e., from the http://example.com/site http://example.com, or http://example.com http://example.net), you will need to perform the following steps – in sequential order.
- Download your existing site files.
- Export your database – Access to MYSQL and export the database.
- The backed-up files and databases into a new folder and stored in a secure location – this is your site’s backup.
- Log in to the site you want to move, go to Settings > General, then change the URL. (That is, from the http://example.com/, http://example.net – Save the settings, and look forward to seeing a 404 page.
- Your site to download the file.
- To export the database.
- Edit the wp-config.php and MYSQL Database to the new server name, user and password.
- The uploaded file.
- Import the database on the new server.
When your domain name or web address changes have more attention. These files and database can be moved, but refer to the old domain name or location will remain in the database, and may be the cause of the problem link or theme display.
If you do a search and replace your entire database to change the URL and can be the cause of the problem data serialization, this is because some of the topics and small parts storage value to your URL. When this happens, break down. In order to avoid such a sequence, you have four options:
- Use the velvet blue plug-in update URL if you have access to your WP management dashboar.
- The use of better search and replace plugin if you have access to your WP management dashboard.
- Use the CLI WP search and replace if your hosting service provider (or you) is installed WP CLI.
- Use the search and replace with wordpress database scripts to safely change all instances of the old domain or the path to your
- new one. (Use this option only if you are already familiar with database management**).
Moving Directories On Your Existing Server
The wordpress files from one location to another on your server), i.e., change the URL – requires some special care. If you want to move wordpress into its own folder, but it is running from the root domain, please read the wordpress own directory for details.
This step-by-step instructions to your wordpress site to a new location on the same server, perform the following steps:
- Create a new location using one of the following two options:
- If you are in your wordpress core files to a new directory, create a new directory.
- If you want to move wordpress in your root directory, make sure that all of the index.php, .htaccess as well as other files, these
- files can be copied to the backup and/or mobile, and the root directory of the installation of the new wordpress file.
- Log in to your web site.
- Go to Administration > Settings > General screen.
- In the box, the wordpress address (URL): Change of address to the new location, your main wordpress core files.
- In the box in the web site address (URL): Change the address to a new location, it should match the wordpress (your public site).
- Click to save the changes.
(Please do not try to open/view your site!
- To move your wordpress core files are copied to a new location. This includes the found file of the original directories, such as the http://example.com/wordpress, and all sub-directory to a new location.
- Now, try to open your site by entering the yourdomain.com/wp-admin. please note that you may need to go to the yourdomain.com/wp-login.php
- if you use permalinks, go to Administration > Settings > permalinks screen and update your permalink structure, your .htaccess file, the file should be in the same directory as the main index.php file.
- The existing image/media links uploaded media will refer to the old folder, it must be updated to the new location. You can do this with the melancholy of the velvet update URL or better search and replace plugin, WP CLI search and replace if your hosting service provider (or you) is installed WP CLI to manually in your SQL database, or by using a third-party database update tool to search for and replace the database scripts * Note: This script, it is best used by experienced developers.
- In some cases you may have to change, depending on your ISP. Watch for any file with “0000”, and restore it to “0644”.
If your theme Support menu, links to your home page may also, and the subdirectory embedded into them. Go To Appearance > Menus and update them.
Sometimes, you will need to restart your server, your server may give an error. (In the MAMP software (Mac).
The most important thing is that you set the URI of the location, and then move the files.
If You Forget to Change the Locations
If you do not intend to move, and then change the URI: You have two options.
Suppose the file first in/path/to/Old/and you move to the /path/to/changed before the new URI. To resolve this issue in a way that enables/path/to/Old/a symbolic link (for windows users, the symlink” is equivalent to “shortcut”)/path/to/New/, ln -s/path/to/New/path/to/Old, then follow the steps above is normal. Then, delete the symbolic link if you want.
If you forget to change the wordpress Blog address and address, you will not be able to change it using the wordpress interface. However, you can fix it, if you have access to the database. Go to the database, your web site and locate the wp options table. This table is used to store all of the options that can be set in the interface. In the wordpress Blog address and address stored as siteurl and home (the option name field). All you have to do is to change the option’s value field is the correct URL, the records with the option name=’siteurl’ or the option name=’A’.
If You Have Accidentally Changed your WordPress Site URL
If you accidentally change the UR, you will not be able to move the files, but you can still access the log-in page, redirect or something).
The wp-Login.php can be used to (re-)set the URI. Locate this line:
function function requires dirname_NL file). ‘/Wp load.php’);
and insert the following line:
//FIXME: Do Note/remove these hackers. Once the database has been updated)
update options,”,’ http://your.domain.name/the/path’ siteurl); the
update option (the ‘home’, ‘http://your.domain.name/the/path’);
you want to do. Test your site to make sure it works. If the change involves a new address to your site, please make sure that you let people know the new address, and consider adding some redirection in your .htaccess file to guide tourists to the new location.
If Your WordPress Site Has a Customized upload_path Value
This is possible, but it is not likely that the path option value may be set up some very old wordpress site or the site’s location, the designer needs to customize this path. In this case, you should verify that the path is still valid when moved, and adjust it as needed. If it is an absolute rather than a relative path, the path that may be incorrect, please use the new server. An incorrect on the path that will lead to problems with media upload and the file system errors, try creating a wordpress upload directory is on the wrong path. (See ticket ticket number 41947)
, the path option cannot be modified on the wordpress admin settings screen, it must be edited in the Options table in the database.
Typically, the path value may be blank and wordpress will use the default path. If this value is not null, contains a value instead of the default upload, you may need to do further research to determine how to handle the upload site after the move.
Managing Your Old Site
Shutting It Down
Download a copy of the main wordpress files from your old web site to your hard drive and edit the wp-config.php in order to adapt to the new server.
- Go back to your old site, and then go to Administration > Settings > General and change the URL (2 persons), and your new site.
- Log in to your server, go to the phpmyadmin and export to a file, and save your database (but keep the old one just in case). Now,
- upload the new database and will copy the wordpress core files to edit the config.php WP to your new server. That’s it!
Keeping it Running
Note: Please make sure that you have backed up your old site’s wordpress database and then continue!
- Part A – activate your new web site to
- download your entire wordpress install to your hard drive. The name of the folder to indicate that it is your old site installation.
- Download your database.
- Go back to your old site and go to Options and change the url (2 persons), and your new site.
- Once again, the download your entire wordpress install to your hard drive. The name of the folder to indicate that this is your new site.
- Download your database again (but keep the old one). Upload the database to a new server. This will be the most vulnerable. If you use the same database name, you can create a user using the same login credentials, your new server, because the old server.
- If you are using a different database name and/or the user (see previous step), edit the wp-config.php in your new site installation folder to the appropriate personnel.
- To upload a new site installation folder, your new site. Presto, your new site should be in work!
Part B – Restore your old site
- in the original server, remove the old site database (Remember, you should have a copy on your local computer, and at the beginning of time.
- Upload your old site installation folder to your server, overwriting the original file, is there, and you can also delete the folder on the server and simply re-upload the old site).
- Upload your old site’s database from your local computer to the server. This should be done!
Another program, make a copy of the post, comment, pages, categories and custom fields (Power On Self Test Status, data, permalinks, ping status, etc.) Ease of Use: The
installation of a new wordpress site
to the old site management screen. Here, in the Management > Export select “All”, in the menu of the author.
Click Download export file
, the new Site Management > Import, select the wordpress project.
1. On that page, the page is displayed, simply select the file export. Click the upload files and import
2. them into a page. The author in the assignment, the author, already exists, or create a new one.
3. when finished, click Fun
4. Note: Use this method if you have a number of provisions of the new sites, such as Hello World, information pages, and so on and so forth), these will not be erased. The article is added. Use the front, the article in the new site will be deleted.
Moving WordPress Multisite
Multi-site is somewhat more complicated, as part of the database itself, there is more than one reference to the name of the server, and the folder location. If you only need to move to a new server, use the same domain name, you can copy the file and the database, in exactly the same way, you can use a traditional installation.
On the other hand, if you want to change the domain, then the best way is to move the multi-site mobile file, edit the .htaccess and wp-config.php (change the domain in an existing site, and in the name of the folder that contains the multi-site changes, the current (site), and then manually editing the database. Search for all instances of your domain name and, if necessary, change it. This step also cannot be easily automated. This is safe. The search/replace any one of the wp’s x position, but do not attempt to blanket the Search/Replace, without having to search for and replace with wordpress Database Scripts (aka the interconnectit script).
If you have a multi-site from one folder to another, you need to make sure that you edit the WP blog entries, change the folder name is correct. You should manually review two wp sites and wp blog, and does not take into account, in order to ensure that all site changes correctly.
In addition, manually inspect all of the WP x options table to find three fields, and on the basis of need to edit:
if you are moving from a sub-folder, or vice versa, remember to adjust the .htaccess file and the value of the installed on your WP php files.
- Educhalk: how to use wordpress to a different server and web addresses, 2-part video series
- how to move wordpress site to another server without downtime
- mobile blog from wordpress.com to a self-hosted
- wordpress blog to a new domain or server
- Italian version of this article – articolo versione italiana Dell
- search and replace with wordpress database
- cloning a live wordpress web site to the local MAC testing environment the
- PHP script to replace the site url in the wordpress database dump, even if there is a WPML
- copy the plug-in can help administrators to a site from one location to another location