• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Fix WordPress 4.7 Upgrade Failed : Nginx+PHP7+HTTPS+Genesis+W3TC

By Abhishek Ghosh December 10, 2016 2:09 pm Updated on December 10, 2016

Fix WordPress 4.7 Upgrade Failed : Nginx+PHP7+HTTPS+Genesis+W3TC

Advertisement

WordPress 4.7 version auto update to WordPress 4.7 likely to break website. Our step by step guide to fix WordPress 4.7 upgrade failed with Genesis and W3 Total Cache. It is really not for Shared Server users but they can modify steps. We do have guide to use limited SSH on some shared server. As you can see we are loading website, it was down for failed upgrade and took 1 hour to fix. Please follow our steps, if still site is not working, ask us on Twitter for free.

 

Why Situation Arising to Fix WordPress 4.7 Upgrade Failed?

 

It is commonly happening because Linux kernel is normally not allowing some files modification via PHP cURL or old cache, cookies from Nginx, WordPress W3TC etc are creating conflict. Database thankfully is not getting destroyed. HSTS (listed on HTTPS Everywhere List) can give additional odd situation. Commonest situation of WordPress 4.7 upgrade failed is that –

  • You can login to wp-admin but it is white page.
  • Frontend hardly has few stuffs but no text
  • You clicked WordPress prompt to upgrade database
  • Latest Genesis officially supports WordPress 4.7.
  • W3TC has no official support
  • WordPress has no paid official support
  • Your server is unmanaged
  • Peoples are waiting to suck your hard earned money
Fix WordPress 4.7 Upgrade Failed Nginx+PHP7+HTTPS+Genesis+W3TC

 

Steps Fix WordPress 4.7 Upgrade Failed (With Genesis, W3 Total Cache)

 

We are taking that your FTP root is at /usr/share/nginx/html/, Nginx virtual hosts file is /etc/nginx/sites-available/default on Ubuntu 16.04 LTS using PHP7, W3 Total Cache, Genesis theme frame works and common plugins we suggest to use and written on our setup. Funnily all plugins are compatible but upgrade throws error. Change location commands on your need. We suggest to use the default settings for many reasons. SSH to server. First thing is that, /etc/nginx/sites-available must not have any W3TC related directions. Usually the directive will be wrapped with # BEGIN W3TC like lines. Cut and paste them on separate directory’s new file like on location /etc/nginx/ as w3tc.conf. You’ll later include the file from the main /etc/nginx/sites-available file in this way :

Advertisement

---

Vim
1
include /etc/nginx/w3tc.conf;

If you need such change, do and restart Nginx :

Vim
1
2
nginx -t
service nginx restart

Change directory to /usr/share/nginx/html/ :

Vim
1
cd /usr/share/nginx/html/

Create two directories :

Vim
1
2
mkdir /usr/share/nginx/html/new-wordpress
mkdir /usr/share/nginx/html/old-wordpress

We will rename (actually) few handpicked files, directories but will keep backup. Go to Plugins directory and deactivate all, do these steps even if you can not understand :

Vim
1
2
3
4
5
6
7
cd /usr/share/nginx/html/wp-content
mv plugins diabled-plugins
mv cache disabled-cache
mv db.php disabled-db.php
mv object-cache.php disabled-object-cache.php
cd /usr/share/nginx/html
nano wp-config.php

comment out or delete two lines related to W3 Total Cache on wp-config.php, so that the file’s those lines look like this :

Vim
1
2
3
4
5
6
7
8
...
/** Enable W3 Total Cache */
// define('WP_CACHE', true); // Added by W3 Total Cache
...
/** Enable W3 Total Cache Edge Mode */
// define('W3TC_EDGE_MODE', true); // Added by W3 Total Cache
...
require_once(ABSPATH . 'wp-settings.php');

Now we will move wp-admin, wp-includes and other files, delete few :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
cd /usr/share/nginx/html/wp-content
mv plugins diabled-plugins
mv cache disabled-cache
mv db.php disabled-db.php
mv object-cache.php disabled-object-cache.php
rm -r /usr/share/nginx/html/wp-content/cache/page_enhanced
rm -r /usr/share/nginx/html/wp-content/cache/object
rm -r /usr/share/nginx/html/wp-content/cache/db
rm -r /usr/share/nginx/html/wp-content/cache/minify
cd /usr/share/nginx/html
mv wp-admin diabled-wp-admin
mv wp-includes disabled-wp-includes
mv diabled-wp-admin old-wordpress
mv disabled-wp-includes old-wordpress
mv index.php license.txt  wp-blog-header.php  wp-load.php  wp-signup.php wp-comments-post.php  wp-login.php   wp-trackback.php readme.html wp-cron.php wp-mail.php xmlrpc.php wp-activate.php wp-links-opml.php wp-settings.php old-wordpress/
ls old-wordpress

You’ll see that old-wordpress has your old files. Now we will prepare new WordPress :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
cd /usr/share/nginx/html/new-wordpress
wget https://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz
rm latest.tar.gz
cd wordpress
mv * ..
cd ..
rm -r wordpress
rm wp-config-sample.php
mv index.php license.txt  wp-blog-header.php  wp-load.php  wp-signup.php wp-comments-post.php  wp-login.php   wp-trackback.php readme.html wp-cron.php wp-mail.php xmlrpc.php wp-activate.php wp-links-opml.php wp-settings.php ..
mv wp-admin ..
mv wp-includes ..
cd /usr/share/nginx/html
ls

You’ll see that your FTP root has all new files. Now try to login via wp-login.php webpage. You’ll be able to login. Still you may not see the frontend loading. You have to install the new default WordPress theme and active it. After activating, go to frontend, you’ll see that your website is now loading text. Now activate the latest Genesis base child theme (not your any custom child theme), you’ll see that your website is now loading text. Now activate the plugins :

Vim
1
2
3
cd /usr/share/nginx/html/wp-content
mv w3-total-cache disabled-w3-total-cache
mv diabled-plugins plugins

Plugins will get activated except W3 Total Cache. Activate your custom child theme. Go to frontend and WordPress will load fine. Exactly like it was. Use this W3 Total Cache in future :

Vim
1
https://github.com/szepeviktor/fix-w3tc

Everything is done. If all is fine you can delete the directories we used :

Vim
1
2
rm -r /usr/share/nginx/html/new-wordpress
rm -r /usr/share/nginx/html/old-wordpress

You can change the WordPress security salt :

Vim
1
curl -s https://api.wordpress.org/secret-key/1.1/salt/

You need to set the permission, ownership properly :

Vim
1
2
sudo chown -R www-data:www-data /usr/share/nginx/html/
sudo find /usr/share/nginx/html -type d -exec chmod g+s {} \;

Possibly all done.

Suggested Steps For the Next Time

We will suggest to use web hosts like Aruba Cloud (1 Euro/month for 1 GB RAM VMware instance) or VPSDime ($7/month for 6GB RAM OpenVZ instance) to clone the whole server before running upgrade. You can get reviews of others on Low End Box, Web Hosting Talk. They are far superior than Linode, DigitalOcean, Amazon. You need Dyn DNS or Hurricane Electric DNS with them. We have no affiliate links or affiliate like links are not for money making. We took a full FTP, Database backup before proceeding to fix. Most do not have latest backups, we have guide on using DropBox from SSH for pushing backups.

Tagged With w3tc 4 7 , w3tc nginx minify conf
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Fix WordPress 4.7 Upgrade Failed : Nginx+PHP7+HTTPS+Genesis+W3TC

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud

    Here is a Step by Step Guide on Setting Up WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud with All Commands and the Configuration.

  • How to Install WordPress : Ubuntu 16.04, Nginx, PHP7-FPM

    Here is Step by Step Guide on How to Install WordPress on Ubuntu 16.04, Nginx, PHP7-FPM, memcached & Percona MySQL 5.7 on Cloud Server or VPS.

  • Nginx WordPress Configuration Sample File

    Here is Ready to Use Nginx Wordpress Configuration Sample File Which Can Used With Either Community Edition of Nginx or Nginx Plus & PHP5-FPM.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy