How to fix WordPress permissions after moving from WPEngine to alternate hosting.

Introduction

Fix-WP was approached for some help in migrating their WordPress website from WPEngine over to an alternative hosting platform. They had already moved the site files and database to the new hosting, but were getting permission errors after the migration.

Issue Reported

When trying to go to the website in question, it was clear that there were some sort of permission issues. They were getting Server Error 403 Forbidden messages.

Error 403 on a wordpress site
Server Error 403 after Migrating from WPEngine

Initial Inspection

Once I logged on to the new hosting platform, I was able to see the 403 errors confirming that this was indeed permissions. Im not sure what WPEngine do when you export your site, but it certainly does something screwy with the zip file that has the entire site contents and database included.

About this WordPress Install

WordPress Version : 4.9.9

Theme : Custom

Plugins installed :

  • Advanced Custom Fields Version 4.4.12
  • Advanced Custom Fields: Options Page Version 2.0.1
  • Advanced Custom Fields: Repeater Field Version 2.0.1 
  • Cookie Consent Version 2.3.10
  • Easy Social Share Buttons for WordPress 4.0 Version 4.0
  • Google Analyticator Version 6.5.4
  • Jquery Validation For Contact Form 7 Version 4.1
  • Loco Translate Version 2.1.3
  • Maintenance Version 3.6.1
  • oAuth Twitter Feed for Developers Version 2.3.0
  • PayPal for WooCommerce Version 1.4.8.9
  • Really Simple SSL Version 2.5.26
  • WooCommerce Version 3.3.5
  • WooCommerce Bookings Version 1.11.1
  • WooCommerce Dynamic Pricing Version 3.1.6
  • WooCommerce Google Analytics Integration Version 1.4.4
  • WooCommerce Menu Cart Version 2.7.1
  • WooCommerce Print Invoices/Packing Lists Version 3.5.0
  • WooCommerce Product Add-ons Version 2.9.4
  • WooCommerce SagePay Form and SagePay Direct Gateway Version 3.11.2

How to fix WordPress Permission Errors after migrating away from WPEngine

Put quite simply, Directory permissions need to be set to 755, and files need to be set to 644 on most WordPress installs. There are suggestions that the WP-Includes directory should be set higher.

As I had access to the shell of this server, it was a simple process of connecting and running 2 commands.

Many hosts now allow shell access into your own hosting area, this one was on a Plesk control panel and I had this access.

Login to the shell and CD into your wordpress directory in this case, the path was: /var/www/vhosts/yourdomainaddress.com/httpdocs/ type ‘ls’ and press enter to confirm the correct directory.

Listing the WordPress directory in the server shell
Contents of the wordpress directory when viewed via the server shell

To set the permissions of all the WordPress directories (755), Type the following command and press enter:

find . -type d -print -exec chmod 755 {} \;

Depending on the size of your wordpress directory structure, this may take a few moments.

Once finished, To set the permissions of all the WordPress files (644), Type the following command and press enter:

find . -type f -print -exec chmod 644 {} \;

And thats it! you’ll find that your migrated site from WPEngine should now be accessible on your new platform.

Did the above article work for you? if so let me know in the comments below. If not, Feel free to drop me a mail.

Leave a Comment