- Wordpress

Solution of redirection of WordPress


This article aims to solve the redirect problem of WordPress.

Step 1. Check the website address

Check the website address in the admin page, make sure it is correct. It is in the Settings/General page.

Step 2. Open the template-loader.php

Open the template-loader.php file. Assume the root dir of the wordpress is “wordpress”.

# If the dir required root permission, add sudo at the beginning.
vim /wordpress/wp-includes/template-loader.php

Step 3. Edit the file

Edit the template-loader.php, comment the following codes:

if( defined(‘WP_USE_THEMES’) && WP_USE_THEMES )

Step 4. Save the file and refresh

Save the file and refresh your website, it is ok now.

About Ziqi.Yang394

Read All Posts By Ziqi.Yang394

Leave a Reply

Your email address will not be published. Required fields are marked *