Wordpress Upload Forum Files to Another Location

Like many spider web professionals, I'm so decorated doing things for clients that information technology'south true to say that my ain site often suffers thanks to a lack of time. Ane thing that I take been meaning to do for some time is move the site, which is a WordPress site, to another server, every bit I'thousand not overly happy with my current hosts.

Notwithstanding, it's ane of those things that I've put off doing because it does only seem like a lot of hassle, particularly since my theme is bespoke and therefore any problems and information technology will take fourth dimension to do again (yes, a simple fill-in will have intendance of this, I know).

Begetting all of that in mind, I can imagine that many people have the same problem, or have no thought where to start, then here you will detect instructions on how to carry this out, without losing theme elements or ending up with a site total of broken links.

Keeping the same URL

Firstly, information technology'due south worth noting that if you haven't really optimized the site and intend on keeping all of the URLs, and the domain proper name and the database is going to remain the same, then information technology's a simple process.

If this is the example, then you volition but have to copy the files and database across to the new server. If you want to change the proper name or user of the database you will take to modify the edit.wp-config.php file to ensure that it has the correct values. Locate the following in the root folder and alter appropriately.

          define('DB_NAME', 'user_wrdp1'); /** MySQL database username */ ascertain('DB_USER', 'user_wrdp1'); /** MySQL database countersign */ ascertain('DB_PASSWORD', 'password');        

If you're changing server just keeping your domain name, then you will need to edit wp-config with your new database and user details and then just upload all of your files to the new server.

It'due south pretty obvious also, but bears repeating, that you should make a total fill-in of the site, which should include the following:

  • Plugins
  • Theme files
  • Any uploads that y'all've made
  • The database

To exercise this, you can employ phpMyAdmin, which is an open source tool for managing MySQL databases and includes a wealth of useful tools. Yous tin can choose to consign information in a number of formats, such as CSV, SQL, XML, PDF, ISO/IEC 26300 and others. Alternatively, y'all can utilize a plugin such as WP-DB-Backup.

Uploading from local to a remote installation

Once you're fully backed upwardly and ready to get, kickoff of all you'll need to disable Permalinks. This tin can exist done in the "Permalinks" screen view which is in the "Settings" menu. Choose the default setting and hitting save.

permalink settings

And so, if you haven't already, fill-in the database, make a copy and rename it.

Installing WordPress on the new server

Install WordPress as y'all normally would, either using FTP or through cPanel and then copy all of the files from your local wp-content file to the one on the server using FTP or SFTP. Next, yous will need to edit the database in order to supercede the local URL with the remote one.

For this, employ a search and supplant utility, preferably non a text editor and modify every instance of the local URL to the remote 1. You can use SEARCH REPLACE DB for this, which should exist installed in the root binder of your WP install for all-time results. In order to protect the script from corruption, it's best to rename it before doing anything else.

For example, if you lot rename it newinstall.php, you volition and then go to http://yoursite.com/newinstall.php and follow the on-screen instructions to deport out search and supervene upon. Once you've finished doing this, it'south important that y'all likewise delete the script in order to secure the DB.

Save the database earlier continuing. If a new database has been created when you installed WP, then this volition need to be deleted. You can do this by:

  • Using phpMyAdmin, click on the "Structure" tab
  • Underneath the listing of tables click on "Cheque All"
  • Choose "Drop" from the carte called "with selected"
  • Choose "Yes" when the message pops up asking if you desire to drop all tables
  • Re-enable your permalinks equally you had them in the last installation

phpMyAdmin

You're good to go.

Moving from host to host

If you're moving the site to a new host, it's exactly the same as when you lot upload from a local server, with i fundamental difference being that y'all will accept to download all of your files from the existing host using FTP.

Changing the URL

If you need to change the URL of the site as it's in a subdirectory or it's a new domain name, you can exercise this past calculation some lines to the functions.php file of the theme, every bit below.

          update_option('siteurl','http://world wide web.new-site-address.com');update_option('dwelling house','http://www.new-site-address.com');        

And then, load the new files onto the site and it should work fine. Don't attempt to only copy all of the files and database over, as this won't work properly and you'll terminate up with broken links.

One time you've then loaded the new files, test and delete the lines from the functions.php files, equally your new settings will now be stored and saved in the database.

If y'all need to prepare 301 redirects, which is important to both search engines and users, then you lot'll need to connect to the sometime site and edit the .htaccess file. Locate the file then paste this code at the elevation of the file:

          1 #Options +FollowSymLinks 2 RewriteEngine on 3 RewriteRule ^(.*)$ http://yoursite.com $1 [R=301,50]        

In one case you've washed this, go back to the new site and test to ensure that the changes accept been made successfully. It's besides a good thought to submit the change of URL to Google via Webmaster Tools and you will too demand to verify it.

Finally, once you're confident that all is working well and you lot've checked and tested, remember to tell the site users nearly the change. You can do this in whatever way yous call back will be the almost effective, by newsletter, blog post or on social media and if you still ain the quondam domain, yous can ready upwardly a temporary redirect to catch whatsoever that initially fall through the internet.

That'south it, all you need to do to alter the location of your WP site, even if you're using a new URL.

hansenlooncomet1994.blogspot.com

Source: https://www.sitepoint.com/move-wordpress-new-server-without-losing-anything/

0 Response to "Wordpress Upload Forum Files to Another Location"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel