How To Fix HTTP 524 Time Out Error When Install WordPress WebSite Behind Cloudflare

After I upload a new WordPress 6.0 program to My VPS server, and when I run the WordPress installation file to install it ( https://domain_name/wp-admin/install.php?step=2 ), an HTTP 524 time out error is thrown in step2 of the installation. My WordPress website is behind Cloudflare, this 524 time-out error is thrown by Cloudflare. This article will tell you how to fix it.

1. How To Fix HTTP 524 Time Out Error When Install WordPress WebSite Behind Cloudflare

  1. First, you should remove the WordPress website and it’s used MySQL database on the VPS server.
  2. Then you should edit the hosts.txt file on your local computer to map the domain to the VPS server IP address directly like below.
    vps-server-ip-address domain-name
    vps-server-ip-address www.domain-name
  3. This will make the connection to the domain using the original VPS server IP address directly, it will not use the Cloudflare DNS.
  4. But when you access the website, you need to use the https:// protocol, otherwise, you will encounter other errors, you can read the article How To Fix Nginx Redirect To Wrong Website Error When There Are Multiple WebSites to learn more.
  5. If the above method does not take effect ( for example it returns the 502 bad gateway error), you can install a WordPress website on your local computer.
  6. And then zip your local WordPress folder to a file such as wordpress-website-template.zip ( there is a template WordPress website zip file in my Baidu net disk, the template file name is wordpress-website-template.zip ).
  7. Upload the file wordpress-website-template.zip to the VPS web server ( I use the BT panel, you can read How To Install BT VPS Control Panel And Restore WordPress Website Into It ).
  8. Unzip it to the website root folder.
  9. Change the config.php file to use the website’s new database, username, and password.
  10. Open the website BT panel, and click the Database link in the left side panel.
  11. Then click the Import link on the page right side to import the wordpress-website-template-sql-script.sql file data into the database.
  12. Before importing the SQL data to the database, you need to drop all existing tables in the current database.
  13. Otherwise, you may encounter strange errors such as do not show the Add New button on the WordPress website’s Appearance & Plugins page.
  14. You can read the article How To Fix No Add New Button In Fresh Installed WordPress WebSite Appearance And Plugins Page to learn more.
  15. Open the phpMyAdmin and change the siteurl, home column’s value to the website domain URL in the wp_options table.
  16. Change the administrator user’s user_url in the wp_users table.
  17. For more information, you can read the article How To Restore WordPress Website From Backup.

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Clicky