• 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

This Article Has Been Shared 696 Times!

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

  • Private Cloud Computing : How Private Cloud Works

    Private cloud Computing technology gives the full control and high scalability in a private, dedicated environment mainly as an Enterprise solution.

  • Cloud Computing Junk Websites : Beware of Wrong Information

    Cloud Computing Junk Websites are basically useless websites. Some websites suddenly injecting wrong informations in the search engine to catch visitors.

  • Social, Mobile, Cloud Computing and Information Technology

    Social, Mobile, Cloud Computing and Information Technology – all together made a major paradigm shift. Convergence has opened up new business opportunities.

  • Cloud Transactional Email Service Provider Comparison

    Transactional Email Service Providers Help to Receive Email From Web App. Here is Our Cloud Transactional Email Service Provider Comparison.

  • WordPress XML-RPC Attack & Fake PHP5-FPM Error

    WordPress XML-RPC Attack Can Bring DDoS Resulting in Random 502 PHP5-FPM Errors on Nginx Server or Can Make the Database Down. Here is Fix.

Additionally, 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

  • What is Configuration Management February 5, 2023
  • What is ChatGPT? February 3, 2023
  • Zebronics Pixaplay 16 : Entry Level Movie Projector Review February 2, 2023
  • What is Voice User Interface (VUI) January 31, 2023
  • Proxy Server: Design Pattern in Programming January 30, 2023

About This Article

Cite this article as: Abhishek Ghosh, "Fix WordPress 4.7 Upgrade Failed : Nginx+PHP7+HTTPS+Genesis+W3TC," in The Customize Windows, December 10, 2016, February 6, 2023, https://thecustomizewindows.com/2016/12/fix-wordpress-4-7-upgrade-failed/.

Source:The Customize Windows, JiMA.in

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

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT