Home > CMS Tutorial > WordPress > How to use a proxy server to solve the problem of slow WordPress upgrade

How to use a proxy server to solve the problem of slow WordPress upgrade

藏色散人
Release: 2020-03-09 16:47:47
forward
4609 people have browsed it

The following column WordPress Tutorial will introduce to you how to use a proxy server to solve the problem of slow WordPress upgrade. I hope it will be helpful to friends in need!

How to use a proxy server to solve the problem of slow WordPress upgrade

There are two ways to update the WordPress version, click automatic upgrade in the background or manually download the new version to replace the old one. For convenience, the former is generally chosen to automatically upgrade. However, since the automatic upgrade uses the foreign server downloads.wordpress.org, automatically upgrading WordPress in China will be very slow or even time out and fail.

However, wordpress provides a method to set up a proxy. I have set up a proxy server on a foreign server, which can be used directly. Due to the restriction of the proxy server, it can only proxy the wordpress.org domain name. Please ask after use. Comment out the code so as not to affect WordPress usage.

Solution

Open wp-config.php and add the following code at the bottom:

define('WP_PROXY_HOST', 'us.centos.bz');
define('WP_PROXY_PORT', '31281');
Copy after login

After saving, log in to the WordPress backend and switch to update. Click the Upgrade button to start the update.

After the update is completed, please comment out the code you just added, that is, add // in front, such as:

//define('WP_PROXY_HOST', 'us.centos.bz');
//define('WP_PROXY_PORT', '31281');
Copy after login

Delete the comment next time you need to upgrade.

How to use a proxy server to solve the problem of slow WordPress upgrade

The above is the detailed content of How to use a proxy server to solve the problem of slow WordPress upgrade. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template