Skip to content Skip to sidebar Skip to footer

Upload Files to Midphase What Folder to

Migrating from Shared Hosting to WPEngine the Fast Way

In the last postal service, we sort of laughed about how we've rescued and then many publishers from the grips of OpenX. But there's another villain in the country of hyperlocal publishing engineering science: the hosting provider.

The most popular web hosts amongst our publishers appear to exist Dreamhost, HostGator, and Bluehost. Now, we won't get pointing fingers, but at to the lowest degree one of these companies can't go along information technology together.

Information technology'southward not exactly our core business, but we do occasionally help our publishers migrate from i server to another (nosotros especially like it when they plan to use our adserver afterward!).

Here's a detailed migration guide that will help your tech person migrate the most gnarly of sites from a shared host or lousy VPS to WPEngine in the most efficient and reliable mode possible.It makes heavy use of the command line as opposed to traditional FTP clients, which profoundly speeds up the transfer process (a big deal if y'all've got gigabytes worth of data to transfer).

Just to notation, WPEngine has a pretty solid guide here, but they end short of getting into the technicals, probably for brevity'due south sake. It generally boils down to 2 major steps:copy the wp-content binder from your onetime site to your new site, and copy the database too.

We're big fans of WPEngine, a hosting company defended to hosting WordPress installations. They do some smart things to keep a WordPress instance speedy that other hosts don't exercise out of the box. And just ane disclosure: We're an affiliate of WPEngine, simply only because we similar them and then much.

If you're thinking of making the switch, sign up through this link, tell usa, and we'll take $ten off your first calendar month of adserving.

Prerequisites

If you're going to embark on the migration with this guide, you'll demand a few things:

  • Familiarity with FTP/SFTP
  • Familiarity with the control line (OSX/Linux)
  • You onetime web hosts supports shell accounts ("jail" trounce, orjsh is OK). You may have to request this from them.

Itreally helps to exist doing this from a Mac or Linux-based motorcar too. If y'all're migrating from Windows, it may be easier to use the general-purpose WPEngine guide above.

Contents

  1. Become the data off your xxisting host
    1. Get the wp-content binder
    2. Get the database data
  2. Copy files to your local machine
  3. Prepare any SQL information
  4. Upload SQL data to WPEngine
  5. Set up imported WordPress settings rows
  6. Transfer wp-content files
  7. Tie up loose ends
    1. Brand sure site is live
    2. Make sure uploads folder is set correctly
    3. Make sure file permissions are prepare correctly
    4. Switch domain/DNS settings
  8. Wrapping up/Gotchas

1. Become the Data Off Your Existing Host (Highly Technical)

The offset part of migrating is liberating your weblog information from the old host. Theeasiest way to make this happen is to get shell access from your host.

Most hosts will enabled limited ssh/vanquish admission to your account by request only. DreamHost will allow you lot enable a user's shell adequacy in the FTP accounts department of their admin panel.

You have 2 tasks here:

  • Become the WordPress database data
  • Get thewp-content folder

1.1 Getting the wp-content Folder

At this signal, you should have shell access to your host. The outset affair we demand to exercise is SSH into the host:

          ssh username@your-domain.com                  

One time you're in, y'all'll want to go looking for the wp-content folder, which has all the themes, uploads, plugins, etc. It's pretty much the content of the site, minus the blog posts and pages. Every host is different, just these are some common locations for the folder:

  • ~/world wide web
  • ~/public_html
  • ~/htdocs
  • /var/www/
  • /srv/www/

Let's say the name of our site isbroadstreet. We might find our WordPress installation at something like/var/www/broadstreet

You can make up one's mind whether you're at the right place if, within that folder, y'all see a bunch of .php files like wp-config.php, alphabetize.php, and some folders like wp-admin, wp-content, etc.

Some tools for finding this binder are sometimes bachelor. You lot tin can effort to run these commands to help yous find it:

  • locate wp-config.php
  • discover / -proper noun wp-config.php

Let's say we institute wp-config.php in /var/world wide web/broadstreet. Our next step is to navigate to that folder, if you haven't already:

          cd /var/world wide web/broadstreet                  

Now we want to bundle upwards the wp-content binder and move it to our home directory:

          tar -cf wp-content.tar.gz wp-content mv wp-content.tar.gz ~/                  

That kickoff control may have a few minutes to complete.

ane.2 Getting the Database Content

When the last step is done, information technology's time to grab a SQL dump of the database. For this, you demand the database host, proper noun, user, password, and encoding/grapheme set. Luckily, all of that is stored in the wp-config.php file. You tin can view the contents of that file with:

          cat wp-config.php                  

At the meridian of the file, you lot'll see the credentials required to admission the database:DB_NAME,DB_USER,DB_PASSWORD,DB_HOST,DB_CHARSET

For the purposes of this example, we'll say these are our settings:

          DB_NAME: broadstreet DB_USER: user DB_PASSWORD: password DB_HOST: localhost DB_CHARSET: utf8                  

So, we want to grab our database data in SQL form so we tin import information technology into WPEngine later. We'll use themysqldump command to help us with that. Right after, we'll compress it.

          mysqldump -u user -ppassword -h localhost --default-character-set=utf8 -r data.sql broadstreet                  

Note the lack of a infinite between the-p flag and bodily password. If you add a space,mysqldump won't be able to log into the database.

That command may accept a few minutes to run. When it'due south done, you'll have a file namedinformation.sql that has all of your information set up to become. We'll want to compress it too, and so let's gzip it and move information technology to the abode directory:

          gzip data.sql mv data.sql.gz ~/                  

At present we're done on the server end. We'll copy those files to our local motorcar in the adjacent step. Type this to disconnect:

          leave                  

2. Copy the Files You Demand to Your Local Automobile

Now that those data files are hanging out on their server, nosotros want to bring them down to our personal computers so nosotros can ship them up to WPEngine. Since you take a beat account, y'all can do this with with thescp utility.

Let's copy downwards those files:

          scp username@your-domain.com~/wp-content.tar.gz . scp username@your-domain.com~/data.sql.gz .                  

Now you lot've got the files you need. As a little bit of prep work, let's extract the wp-content.tar.gz file and data.sql.gz. On OSX, this is pretty easy. On Windows, you may want to use something like 7zip to assist you out.

One time finished, you should take a binder on your computer namedwp-content and a file nameddata.sql.

three. Set up the SQL Data (If Needed)

There's a run a risk that your exported database tables had some sort of prefix added to their proper name. That's typical for shared hosts that cram a lot of users into a unmarried database instance.

Open data.sql.gz in a text editor like vim, Notepad++, Textmate, etc. You lot'll want a file editor that is smart about handling large files, because this ane might take a while to open.

Await for a table proper noun prefix. If you see something like this prefixing table names:

          INSERT INTO gb3980_wp_users (..., ...)                  

It'southward a hint thatgb390_ is a table prefix that was used on your old host. You lot'll want to do a find/replace on that file, replacing all instances ofgb390_ with cipher, or an "empty string."

Once that's done, you're prepare to motion on.

4. Upload the SQL to WPEngine

Login into your WPEngine dashboard. At the time of this writing, WPEngine is virtually to launch a new dashboard, and so the steps will be different depending on which interface you're seeing.

In the one-time interface, click on the "Admin MySQL" link for your WordPress installation. In the new interface, showtime click into the "Install" that you'll be working with. On the left sidebar, yous'll see a link to "phpMyAdmin." Click that.

Yous'll be in phpMyAdmin, which is a well-known web interface for managing a database. Look for the database you desire to import into. Itvolition not have the prefix "snapshot_". For instance purposes, Nosotros'll say our DB proper name is 'Broadstreet'. There'south a good chance our database is nameddb_broadstreet.

Click into your database, and yous'll accept a list of your tables. Click the "Cheque All" link below the tables. Then caput to the dropdown which saysWith Selected: and cull "Driblet". Click the "Go" button at the bottom. You may take to confirm the table drop.

Finally, click the import tab at the top. On that folio, y'all'll see a file selection box. Select the data.sql file that you extracted (and possibly edited in pace 3). Option the character set of the file, which is likelyutf8. It's the same thing from the--default-character-set=utf8 in stride ane.

Note that MySQL encodings similarlatin1 are in that dropdown too, but instead oflatin1, it'll sayiso-8859-1.

Click import, and get ready to wait a while. When the page reloads, your data should exist imported. If in that location was a timeout or other fault, endeavor again.

If you're all the same having trouble, contact WPEngine.

5. Fix Your Newly Imported Database

Now that your data is in the database, we need to gear up the "Site URL" entries in the wp_options table. At present that y'all're on WPEngine, your URL has changed, and we need to reflect that in the configuration. And continue in heed, we discuss mapping yourreal domain, like yoursitename.com, to WPEngine later.

Your WPEngine URL is probably something likeyoursitename.wpengine.com.

Click the "SQL" tab at the top, and execute this SQL, replacing "yoursitename" with your bodily site name:

          UPDATE wp_options  Prepare   option_value = 'http://yoursitename.wpengine.com' WHERE option_name  = 'siteurl' OR    option_name  = 'home'                  

That should be all. Now you lot're ready to transfer your files!

6. Transfer Your Files

The only way to transfer your files to WPEngine is via SFTP. You can prepare upwardly an SFTP account on the WPEngine dashboard. In the old interface, you click "Manage WordPress", then click on the "SFTP" tab. In the new interface, you click into your "Install". Then there's a panel for managing SFTP logins. Create a login if needed, and go along that username and password handy!

In terms ofhow y'all transfer files, there are two ways:

  • An FTP customer, such every bit Transmit (OSX) or FileZilla (Windows)
  • LFTP — A faster, more efficient FTP client for OSX and Linux

We won't discuss the details of using a plan vanilla FTP customer hither. If you don't know how to apply one, you're probably improve off hiring someone who is. Just the bones goal is to upload the contents of the wp-content folder you have locally to the wp-content folder you lot take on your WPEngine server.

Using LFTP tin relieve a lot of fourth dimension (like, hours-worth) when you have a lot of content to transfer. On OSX, your can easily install it one time you lot take the brew parcel manager. In one case that'due south installed, yous open up a final and type:

          mash install lftp                  

On linux, yous can runsudo apt-get install lftp orsudo yum install lftp, if it isn't already installed.

When that's prepare to go, open up a terminal and navigate to the wp-content directory. And so, login to WPEngine with lftp:

          lftp sftp://yourusername@yoursitename.wpengine.com cd wp-content                  

You should accept been prompted for a login in one case you ran the second command. Now, you're ready to transfer files. Run:

          mirror --opposite -c --parallel=iv                  

This will send all of your files up to WPEngine. It may take a couple of hours to complete depending on how much data you're sending. When it'southward washed, you're almost there!

7. Tying Upwards Loose Ends

At this betoken, your database has been transferred, and so have your files. Here are some last things to practise and check earlier you call it a twenty-four hours.

vii.ane Make Sure Your Site Is Alive

When you head to to http://yoursitename.wpengine.com, y'all should see your site equally information technology once was on your old host, but now on WPEngine. Log into the site by heading to http://yoursitename.wpengine.com/wp-admin.

7.2 Gear up Your Uploads Folder Correctly

In WordPress, click on Settings -> Media. Make certain the "Shop uploads in this folder" field is empty. Some settings from your quondam host may have been carried over here.

vii.iii Make Sure File Permissions Are Set Correctly

File permissions are always a mess one time you lot migrate things via SFTP. There should be a "WPEngine" link in the upper-left part of the WordPress dashboard. Click that. On the folio that loads, click the "Reset File Permissions" push. This volition ensure that new file uploads volition work correctly.

vii.4 Make Your Old Domain Signal to WPEngine

Y'all probably used to have a website at www.yoursite.com, only now you lot want that domain to point to WPEngine. This is where you lot shouldactually know what you're doing earlier yous make any changes.

There'southward no step-by-pace here, because everyone's setup is a petty different. But here are some tips for those with different situations:

You Registered the Domain with Your One-time Host

If your old site was on something like GoDaddy, midPhase, Bluehost, HostGator, etc, yous may have registered your domain with them when you signed upwardly. Since you site won't exist with them whatever more, you usually have ii options here:

  1. Keep the domain with your old host and pay for domain hosting only (enquire your electric current host most this)
  2. Transfer the domain to a DNS host, like Gandi.net

In instance 1, you would eventually end up having to edit the DNS configuration on your existing host, and pointing it to WPEngine's servers.

In example ii, get an account with Gandi (or some other DNS host). Then, follow this guide: http://wiki.gandi.cyberspace/en/domains/transfer

Yous registered the Domain with Someone Else

This is the less probable, but preferred situation. This happens when yous buy domains on a whim, like the author of this guide does, with a registrar account at 1&i, GoDaddy, and many others.

In this case, you should hands be able to observe where to edit your DNS settings. Inquire your registrar if not (that's always fun!). Movement on to the next pace.

What to Practice Next

Now, officially, you'll want to make thewww subdomain a CNAME and signal it to yoursitename.wpengine.com — and set up the root domain, yoursitename.wpengine.com as a simple redirect to www. Most hosts allow you do that.

The reason I say "officially" is that with the method above, you lot avoid creating A records that point directly to an IP accost on WPEngine'southward side. This way, if they ever need to reconfigure IPs beyond their system, y'all won't be affected.

If for some reason y'allreally desire to create A records and indicate them to an IP, you can always use the 'dig' control in OSX/linux:

          dig yoursitename.wpengine.com                  

That'll transport back the A tape value. Just don't go thinking the IPocolypse is and impossibility.

Once the Domain is Reconfigured, Fix the wp_options Table

Remember how we changed the site URL configuration in step 5? At present you need to go dorsum into phpMyAdmin and re-run that SQL, merely replace yoursitename.wpengine.com with your domain name (perhaps, yoursitename.com).

8. Wrapping Upwardly

Whew! There were a lot of steps there. In practice, the migration isn't so long and boring as it might seem here. We basically wanted to give you a no-gotcha migration guide. That said, here are some nasty things that can cause "gotchas":

  • Y'all come from an instance of WordPress where core files were modified
  • Sure plugins may take saved data in the wp_options, user_meta, or post_meta pointing to the old host (filepaths and URLs, in item)
  • Some evil plugins may have saved files (uploads, data) somewhere exterior of wp-content

All of those situations are possible, so you should do some sanity checks. If you lot notice yourself contesting with i of these, we salute yous. There's some madmen running effectually in the freelance world doing what they shouldn't be doing.

If you have whatsoever questions, reach out! We realize that with a guide every bit circuitous equally this, there'southward likely to be something we haven't fabricated completely clear, and may be able to improve.

Migrating

boganfento1981.blogspot.com

Source: https://broadstreetads.com/migrating-shared-hosting/

Postar um comentário for "Upload Files to Midphase What Folder to"