Let's get started.
Blog
About
Contact
Migrate from WP Engine to Another Server

Blog

Viewing posts from the Blog category

Migrate from WP Engine to Another Server

So I recently had to migrate a website from WP Engine to a GoDaddy VPS and it wasn’t fun. I’ve moved hundreds of sites in my time and usually, things go pretty smoothly. However, WP Engine sites aren’t exactly like the rest so I thought it would be a good idea to write something in case anyone else runs into issues. This post assumes you’ve done a migration before and somewhat know what you’re doing.

Let me start off by saying it doesn’t really matter which environment you’re moving to. The post will focus specifically on moving away from WP Engine. If you’re looking to migrate to WP Engine, just use the WP Engine Automated Migration plugin. And if you just need general website migration help, feel free to reach out. Otherwise, let’s get started. This probably goes without saying but before you begin, backup the site! WP Engine does this by default but I have to say it anyway.

  1. In the WP Engine User Portal, click Backup Points in the left-hand menu. If no backups exist, create one by clicking Back Up Now. If you are presented with a list of backups, select the most recent backup and click Download ZIP. Choose Full Backup and enter your email address. You’ll be notified by email when the download is ready.
  2. Once you receive the email and have downloaded the zip file, unzip it and delete the following items:
    • wp-content/mu-plugins
    • wp-content/advanced-cache.php
    • wp-content/object-cache.php
    Note: Either one or both of the advanced-cache.php and object-cache.php files may or may not exist. If they exist, delete them. If not, move on.
  3. In the wp-content folder, you’ll find a file called mysql.sql. That’s your database. Pull it out of the folder and keep it somewhere safe, you’ll need it in a bit.
  4. Once you’ve completed these steps, take the remaining files and folders and upload them to the root folder of your new hosting environment.
  5. Create a blank database and add the database user to the database with full privileges. Write down your new database name, database username, and database password.
  6. Now head over to the wp-config.php file in the root directory, open it up, and replace the existing database credentials with the new ones you wrote down in the previous step. Note: Some people will say to replace the existing wp-config.php file with a default WordPress file, but that’s where I ran into issues. It wasn’t until I used the existing file that I actually got the site working…relatively.
  7. Open up phpMyAdmin and click on the new database name in the left-hand tree. Then click Import in the upper menu. Use the Choose File button to browse your computer for the mysql.sql file you put to the side earlier. Once you’ve selected it, click Go. This should load your database and hopefully, you’ll get no errors.

At this point, in theory, your site should be working. However, you may run into some issues and I want to cover a couple issues you may see.


404 Errors on Every Page Except the Home Page

If this happens, the issue most likely has to do with your permalinks. You could just delete your .htaccess file and replace it with a default .htaccess file. To do this, go into your root folder and make sure you’re viewing hidden files. Delete the .htaccess file and create a new file with the same name. Add the following to the file and save it.

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

500 Error on the Entire Site

This probably has to do with the server resources on your new server. There are multiple ways to set the server resources and how you do it depends on which environment you’re using but once you find it, start with the following numbers:

max_execution_time 180
memory_limit 128M
post_max_size 32M
upload_max_filesize 32M

If it still doesn’t work, try bumping these numbers up a bit.

Move from MacOS Mojave Beta to Final Release

If you’re like me and installed the MacOS Mojave Beta, you may be wondering how to migrate to the final release. Granted, you don’t necessarily need to do this since the final beta version is the gold master, but if you don’t want to stay on the beta path and receive beta version updates, you’ll want to jump over to the final release.

To do this, follow these steps:

  • Open System Preferences
  • Click on Software Update
  • Click Details under “This Mac is enrolled in the Apple Beta Software Program”
  • Click Restore Defaults

You are now unenrolled from the beta program path.

Once that’s done, hop over to the App Store and search for Mojave. It should be the first option displayed. Download it and follow the prompts to install it. Once your computer has restarted, you’ll be on the final release of MacOS Mojave.

Bootstrap 4 Column Issue in Safari

So if you know anything about me, you know I love Bootstrap. It’s clean and allows you to make some great looking sites, responsively. I know a lot of people will say Flexbox over Bootstrap but Bootstrap 4 added Flexbox support so there ya go. That’s why I was pretty excited when Bootstrap 4 came out at the beginning of this year.

That said, I’ve found an issue using Bootstrap 4 with Apple Safari. The columns don’t line up as they should. For example, let’s say you have a three column row using .col-md-4. That should give you three columns, right? Unfortunately, in Safari, it doesn’t. You end up with the third column wrapping to the next line. See the figure below:

This drove me crazy for the longest time because I couldn’t figure out why it was happening. I did some digging and found a solution to this pesky problem. A tiny bit of CSS. Just add the following CSS to your site and the issue is fixed.

.row:before, .row:after {
    display: none !important;
}

Now I know this probably isn’t the most elegant solution but it works and from what I’ve found, doesn’t negatively impact anything else. I figured I’d post it for anyone else going crazy trying to figure out this issue.

Target Microsoft Edge and IE with CSS

Let’s face it, for more than two decades, Internet Explorer has been the albatross of web browsing. Back in the day, it was pretty much all that was available to us. Now we have a number of different options which are all great. As of 2015, Microsoft scrapped IE and gave us a new browser called Edge, and though it’s better than IE, it still falls short in supporting some fairly common code.

That said, if you’re a developer, you’ll often be faced with the need to write “other” code for Edge and IE. Normally, you would do this with conditional comments such as:

<!--[if IE]>
  <link rel="stylesheet" type="text/css" href="ie-style.css" />
<![endif]-->

But as of Internet Explorer 10, Microsoft has dropped support for conditional comments. Therefore, the next best way to target either of these browsers is with CSS. Below, you’ll find some simple code that’ll allow you to write CSS specifically for these browsers.

Microsoft Edge

@supports (-ms-ime-align:auto) {
    .selector {
        property: value;
    }
}

Internet Explorer 10+

@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
     .selector {
        property: value;
    }
}

If you’re trying to target Internet Explorer 9 and lower, you can simply use conditional comments.

As of the posting of this blog, these pieces of code have been tested and work great. Just keep in mind this code could become deprecated over time. If you’re looking for more browser targeting or want something pretty interesting to read, check out Browser Strangeness by Jeff Clayton.

Secure Your Site Before July 1st

With the new version of Google Chrome rapidly approaching, you’ll want to make sure your site is secured or you could end up with a nasty new surprise. Starting in July, the new version of Google Chrome (Chrome 68 to be exact) will start telling visitors your site is “Not Secure” – and they’re going to make it big and red…right next to your domain name.

This could seriously do some damage to your site traffic. With Chrome hogging 55% of the market share, you can’t afford to take that kind of hit. Make sure your site is secure with an SSL certificate and give your site visitors a vote of confidence.

So what’s an SSL certificate? An SSL certificate encrypts your website so all data (i.e. usernames, passwords, credit card info, personal information, etc.) passes through a secure channel. Generally, unless you have an eCommerce site or you’re collecting personal information for one reason or another, it’s not entirely necessary for you to have a secure site. However, there are benefits to securing your site and they greatly outweigh the nominal cost.

Perhaps the greatest benefit of having an SSL certificate is that you rank higher on Google search results. Or rather, you don’t take a hit on Google rankings for not having one. Whichever way you decide to look at it, SEO is one of the most important things you can do for your business, and if having a secure site will help you place better, it’s definitely worth it.

How much does it cost? I can install and maintain your SSL certificate for $100 per year. This will allow you to place better on Google search results, protect your visitors’ sensitive information, and accept credit cards directly on your site. You’ll even get $1 million liability protection.

If you’re interested in setting up an SSL certificate or would like to learn more, contact me and we’ll have you rockin’ and rollin’ in no time!

GDPR Goes Into Effect On the 25th

On May 25th, the GDPR (General Data Protection Regulation) goes into effect. The GDPR is a regulation in European Union (EU) law that essentially gives control to individuals over their personal data as well as simplifies business regulations.

So what does all this mean for you? Well if you live in the US, not much. Most US businesses won’t have to make accommodations unless they receive, or market to, European customers and/or clients. However, you’ll notice a lot of businesses starting to making GDPR changes simply to make it easier on them in the future. Not to mention it’s an easy CYA fix. It won’t be too long before we see something similar happening in the states so we may as well get used to it anyway.

Basically, the GDPR applies to individuals living in the EU. However, if you’re a US-based business and you meet any of the following metrics, GDPR could apply to you.

  • Your site offers translations to non-English used languages in the EU
  • Your site domain uses a top-level domain (TLD) from an EU country (such as .uk, .fr, etc.)
  • Your site displays prices or accepts payment in European currencies (Euros)
  • You ship and/or market products to individuals in the EU
  • You monitor and/or track the online behavior of individuals in the EU

If this regulation applies to you or you’re simply not sure, you can check out the GDPR Information Portal or contact an attorney who specializes in this field. Otherwise, you could be looking at some hefty fines reaching up to €20 million!