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
- First, you should remove the WordPress website and it’s used MySQL database on the VPS server.
- 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
- This will make the connection to the domain using the original VPS server IP address directly, it will not use the Cloudflare DNS.
- 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.
- 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.
- 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 ).
- 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 ).
- Unzip it to the website root folder.
- Change the config.php file to use the website’s new database, username, and password.
- Open the website BT panel, and click the Database link in the left side panel.
- Then click the Import link on the page right side to import the wordpress-website-template-sql-script.sql file data into the database.
- Before importing the SQL data to the database, you need to drop all existing tables in the current database.
- Otherwise, you may encounter strange errors such as do not show the Add New button on the WordPress website’s Appearance & Plugins page.
- You can read the article How To Fix No Add New Button In Fresh Installed WordPress WebSite Appearance And Plugins Page to learn more.
- Open the phpMyAdmin and change the siteurl, home column’s value to the website domain URL in the wp_options table.
- Change the administrator user’s user_url in the wp_users table.
- For more information, you can read the article How To Restore WordPress Website From Backup.