Moving Your WordPress Website to a New Web Server

This site is for those who are curious about how things work so I’m going to begin with some background. If you’re just interested in getting the job done, skip down to the How-To section.

Background

A website is a set of files that exist on a computer that is configured to run a special kind of software called web server software.  The two most popular web server software packages are Apache Software Foundation’s Apache HTTP Server and Microsoft’s Internet Information Services (IIS). Computers that run web server software are often referred to as web servers even though they usually run many other types of software as well. A web server works by listening for HTTP requests from web clients. There are many types of web clients, but the most common kind is the web browser (Chrome, Firefox, Internet Explorer, etc.) When you type in an address or click a link, your web browser sends an HTTP request for a specific file on a specific web server. When a web server receives such a request, it will deliver the content of the requested file to the requesting web browser. When the requesting web browser receives the content of the requested file, it will interpret it as best it can and display it to the user. There are many types of content and many ways in which such content can be parsed and interpreted, but this is the basic process in a nutshell.

All web servers have an Internet Protocal address (or IP address) which is like a mailing address for computers. IP addresses, however, are hard for humans to work with. Instead, we use domain names, which are simply aliases for IP addresses. For example, if you run the command ping www.google.com, you should see output similar to the following.

Pinging www.google.com [74.125.225.241] with 32 bytes of data:
Reply from 74.125.225.241: bytes=32 time=30ms TTL=55
Reply from 74.125.225.241: bytes=32 time=32ms TTL=53
Reply from 74.125.225.241: bytes=32 time=30ms TTL=55
Reply from 74.125.225.241: bytes=32 time=31ms TTL=53

The ping command tells us that we are able to communicate with the computer at IP address 74.125.225.241 using the domain name (or alias) www.google.com. This may seem complicated, but it is very useful when you want to do something like move a website from one web server to another. In our case, we wanted to move Section9 from a web server owned by A2Hosting to a web server owned by Arvixe Web Hosting. We were able to do this with almost no downtime simply by installing a copy of Section9 on the new Arvixe web server and then when it was ready, we simply went to our domain name registrar (GoDaddy) and updated the configuration of our domain name (section9.choamco.com) to point to the IP address of our new web server.

How-To

So from start to finish, a WordPress website can be moved to a new web server by following these simple steps.

  1. Backup up the old WordPress database. This is where your posts, pages, comments, menus and settings are stored. A good tool to use for this is the Export operation in phpMyAdmin. Be sure to export using UTF-8 character encoding.
  2. Backup the old wp-content folder. You can find this folder in your WordPress root location. This is where your plugins, images and other media are stored.
  3. Install WordPress on the new web server.
  4. Restore the old WordPress database on your new server. A good tool for this is the phpMyAdmin import operation. Be sure to import using UTF-8 character encoding.
  5. Restore the old wp-content folder into the new WordPress root location.
  6. Using the administration tool of your domain name registrar service, update the name servers for your domain name. Each domain name requires at least two name servers. These values are used by web clients to find the actual IP address of the server associated with your domain name. When you created an account with your new web hosting service, you should have received two name server names and their IP addresses. They often look like ns1.yourhost.com and ns2.yourhost.com. Replace the current name server values with the ones given by your new web hosting service. Once you make this change, there will be a 2+ hour delay, depending on your domain name registrar service and then all traffic to your domain name will be directed to your newly moved website.
  7. Test your website. If the links are broken, you may need to go to Settings->Permalinks and Save Changes in order to regenerate your permalinks. If there is missing data or your posts have been truncated, you probably have a character encoding mismatch. Re-export the original WordPress database making sure to use UTF-8 character encoding. This ensures that special non-ansi characters (like Chinese characters) can be handled properly. Then delete the new database (the one with missing data) and re-import it again using the UTF-8 encoded export file. Be sure to import using UTF-8 character encoding. Also, be careful how you transfer the exported file from the old web server to the new web server. Some services and/or programs can change the character encoding without your knowing it. Your best bet is to zip it up on the old server, transfer it, then unzip it on the new server.

If you have other issues or wish to move a WordPress site in another way (say from one domain name to another), feel free to email us or post in the comments section below. Also check out the this website for additional information on moving a WordPress site.


New Hosting

In an effort to save money and consolidate resources, Section9 has moved to a new hosting provider. Thanks very much to Boogieman for donating the server space and bandwidth and for facilitating the transition. This was our first WordPress site migration and I am happy to admit that it went more smoothly than I expected. (I am a pessimist when it comes to things like this.) We did run into a few glitches along the way which resulted in about an hour or so of downtime and some temporary data corruption (for which we apologize), but we are now back in action and more streamlined than ever.

We’d like to share what we’ve learned with anyone else who might be interested in moving their WordPress site to a new server so stay posted for a quick write up of our experiences.

Also, we’ve been busy writing a new Android personal security app called PocketWatch. This has turned out to be quite a lot of fun and we’ve decided to feature it in our projects section so stay posted for full documentation, commentary and source code.

Thanks again for your support and keep hacking!


Book Review – Developer’s Guide to Microsoft Prism 4

Developer's Guide to Microsoft Prism 4: Building Modular MVVM Applications with Windows Presentation Foundation and Microsoft Silverlight (Patterns & Practices)Developers Guide to Microsoft Prism 4: Building Modular MVVM Applications with Windows Presentation Foundation and Microsoft Silverlight (Patterns & Practices) by Bob Brumfield, Geoff Cox, David Hill, Brian Noyes, Michael Puleio and Karl Shifflett.

I suppose the best place to start is to say don’t buy this book like I did. Read it or on MSDN or download it from Codeplex. Both options are free. However, if you are the traditional sort and prefer to have a physical book in your hand, it is available from Amazon and other distributors. I personally opted for the Kindle version, which was very convenient, but had I known about the free PFD version at the time, I think I would have saved myself the $16 I paid for it. Unfortunately, I didn’t know anything about Prism when I first came across this book and decided to buy it as a getting started guide. Even though I could have done better cost-wise, the decision was well worth the expense. The Developers Guide to Microsoft Prism 4 is probably the best source of information available on the subject and you will find yourself refering to it again and again as you cut your teeth in Prism development.

 Generally, I don’t like books written by three or more authors and this book has six. Naturally I was sceptical from the outset. Fortunately, the authors of this book are all-stars in this arena so lack of a single voice is more than offset by the wealth of insight and content. More importantly, it is essential to understand that this book was written as both a stand-alone book and as product documentation. When you download the Prism product, you get the full book in the form of Compiled HTML Help files (.chm). The Prism download also includes two reference implementions (RI’s) and ten topic specific Quickstarts. These Visual Studio projects demonstrate the capabilities of Prism and are refered to throughout the book. So although you can benefit from referencing the book on a case by case basis or by reading it from cover to cover in isolation, you will definitely get the most benefit by reading the book while studying the relevant RI’s and Quickstarts as you progress through the chapters. This was how the material was meant to be consumed and if you ignore the RI’s and Quickstarts, you may find yourself frustrated by the apparent lack of detail or overwhelmed by the terminology. I personally tried to read the book as a stand-alone book but lost interest halfway though. I came back six months later to finish it, but discovered that I had already forgotten what I had previously read. I finished it anyway and then read most of it again to fill in the gaps. At that point I discovered the importance of the RI’s and Quickstarts and began studying them. This is when things started to click for me.
On the downside, the book is not for the novice. Prism, as a product, is a standardized implementation of several best practices that have proven to be effective solutions for common .NET architectural problems like modularity, UI composition, unit testing, navigation and multi-platform targeting. As such, understanding Prism requires the reader to have at least a basic understanding of technologies like C#, Linq, lambda expressions, MVVM, XAML, XML, design patterns, etc. Fortunately, the material is clear enough for most readers to be able to learn as they go as long as they are willing to dig into the links provided at the end of every chapter. Nevertheless, some solid WPF and/or Silverlight experience will prove invaluable when trying to take on Prism.

Mjolnir – Project Complete

Section9 is proud to announce that we have finally completed the Mjolnir project! This has been our most ambitious project to date, but it was well worth the effort and we are pleased with how it turned out. Although it’s not official, we are currently in the early stages of designing a second version of the robot which will include significant upgrades to the power system, operating software, and processing power. Stay posted for more announcements. Until then, enjoy the video.


10k Visitors!

As of sometime this weekend, Section9 has officially served 10,000 visitors since going live 16 months ago on May 1, 2012. Thanks very much to all of our viewers and readers! We hope that you find our content useful and engaging. As always, we welcome feedback so please feel free to let us know how we can improve. We have many exciting plans for the upcoming year so stayed tuned for more announcements and keep hacking!


Sight

I’m quite a sci-fi junkie and with Google Glass in the news, I found the following short film very enjoyable. I think we’ll eventually see cybernetics like this, but unless you want to pay rent on your own body parts, let’s hope that the operating software is born in the Free World.


Project Update – Go Me Sudoku!

Due to lack of interest, we have decided to discontinue the Go Me Sudoku! project. Go Me Sudoku! was our first attempt to create a game and so we pull the plug with some reluctancy. Unfortunately, it was designed as a web application for Facebook. In the short amount of time that we worked on it, we discovered that the Facebook API is subject to change somewhat dramatically with little notice and a more effort than we care to commit is required for maintanance. This is true of web applications in general as they sit on the very top of a dynamic and fluctuating ecosystem of technologies and with HTML5 now so close, we see little reason to continue investing in something that is already obsolete.

So it goes…


Raspberry Pi vs. BeagleBoard vs. BeagleBoard xM vs. BeagleBone

If you are interested in doing development on a BeagleBoard, BeagleBone, or a Raspberry Pi, you might find the following feature comparison table useful.

Raspberry Pi (Model A) Raspberry Pi (Model B) BeagleBoard BeagleBoard xM BeagleBone
Price $25 $35 $125 $150 $89
SoC BCM2835 Texas Instruments OMAP3530 Texas Instruments DM3730 Texas Instruments AM3358
CPU 700 MHz ARM11** ARM117JZF-S (core of SoC) 720 MHz ARM Cortex-A8** (core of SoC) 1GHz ARM Cortex-A8** (core of SoC) 500MHZ-USB Powered, 720MHZ-DC Powered ARM Cortex-A8** (core of SoC)
GPU Broadcom VideoCore IV (core of SoC), supports OpenGL ES 2.0, OpenVG 1080p30 H.264 high-profile encode/decode Imagination Technologies PowerVR SGX530 GPU (Core of SoC)
DSP Core of SoC, but without public API TMS320C64x+ (core of SoC, 520 MHz up to 720p @30 fps) TMS320C64x+ (core of SoC, 800 MHz up to 720p @30 fps) None
Memory 256 MB SDRAM (shared with GPU) 512MB SDRAM (shared with GPU) 512 MB MDDR SDRAM 32KB EEPROM, 256MB DDR2
USB 1x USB 2.0 Host Port 2 Port USB 2.0 Host Hub USB HS Host Port, HS USB 2.0 OTG Port 4 Port LS/FS/HS USB Hub, HS USB 2.0 OTG Port HS USB 2.0 Client Port, LS/FS/HS USB 2.0 Host Port
Video Outputs Composite Video, Composite RCA,HDMI DVI-D (via HDMI port), S-Video None
Audio Input None 3.5 mm stereo jack None
Audio Output TRS connector, 3.5 mm jack, HDMI 3.5 mm stereo jack None
Onboard Storage Secure Digital, SD / MMC/ SDIO card slot 6 in 1 SD/MMC/SDIO 4/8 bit support, dual voltage card slot microSD card slot microSD
Onboard Network None 10/100 wired Ethernet RJ45 None 10/100 SMSC LAN9514 Ethernet HUB 10/100 SMSC LAN8710A
Supported Interfaces SPI, I2C, I2S, UART, JTAG McBSP, DSS, I2C, UART, McSPI, PWM, JTAG McBSP, DSS, I2C, UART, McSPI, PWM, JTAG, Camera 4x UART, 8x PWM, LCD, GPMC, MMC1, SPI, I2C, A/D Converter, 2xCAN Bus, 4 Timers, FDDI USB to Serial, JTAG via USB
GPIO Header  26 pin expansion header (8x GPIO) 28 pins (multiplexed) 66 pins
Real-time Clock None Optional None
Power Source 5V via Micro USB or GPIO header 5v via OTG USB, GPIO header, DC power jack 5v via USB, DC power jack

** ARM conservatively estimates that the Cortex-A8 is capable of executing 40% more instruction per second than the ARM11 given equal clock speeds. Additionally, multimedia processing on the Cortex-A8 will outperform the ARM11 by a factor of two due to the NEON extended instruction set. These advantages combined with Cortex-A8′s significantly faster memory cache result in a relative performance differential that is difficult to evaluate when looking at clock speed alone.

http://www.anandtech.com/show/2798/5


Stoo and Boo

I recently discovered that my good friend and fellow hacker [Stoo Pidaso] has been blogging with a very talented lady [Boo] over at stooandboo.wordpress.com. The blog definitely has a technological flavor, but mostly it’s just about real life in the modern world. Check it out! It’s full of good material and very entertaining and they actually update on a regular basis.

Thanks for always keeping it real Stoo and Boo. Respect!


Mjolnir – Update

I apologize for the recent inactivity here at section9. We’ve been very busy wrapping up the loose ends of the Mjolnir project. I suppose I’m a sucker for scope creep cool new features so things are running a little behind schedule, but I’d like to give you an update and talk about some of the features.

First, the last couple months have been spent rewriting the android client (now called Mjolnir Control Panel) to be modular and forward compatible with a BeagleBoard controller, which is how we see the project evolving. Also we’ve spent a lot of time migrating the robot navigation code (SARC) from the Arduino IDE to Eclipse. This is a particularly cool aspect of the project that allows us to develop collaboratively from any platform using one of my favorite development environments. Not that Arduino IDE isn’t cool, but it’s nice to have Git integration, auto-completion, code-folding, syntax highlighting and all the other benefits that Eclipse provides.

We’ve also added a history feature which tracks all navigation activity and will activate whenever the client connection is lost. This works as a “return to base” function but can also be used as rewind/fast forward. We’re not totally sure what we’ll do with this but we hope to eventually support a self-driving mode and may use it with future AI routines.

Support was also added for LCD debug output and Xbee wireless communication.

Anyway, we are working out the last few kinks in the latest version of the SARC code. Once that is done, the rest is just documentation.

Stay posted hackers!


Return top

Info

Section9 is a hackerspace based out of Springfield Missouri. For more information, please see the About Us page or find us on Facebook.