Home > CMS Tutorial > WordPress > How to remove /wordpress from WordPress path

How to remove /wordpress from WordPress path

angryTom
Release: 2019-11-30 14:33:48
forward
3696 people have browsed it

How to remove /wordpress from WordPress path

When we put the WordPress program in the root directory of the space in the form of a folder for the website we built, we need to add the folder name when accessing, and the access address is: http://xxx/wordpress, it cannot be accessed directly using the domain name. Solution:

First, change the "index.php" in the program (in "/www/wwwroot/wordpress") Copy a copy to the root directory of the website (/var/www/html), and then open it. The default format is as follows:

require( dirname( __FILE__ ) . ‘/wp-blog-header.php’ );
Copy after login

In fact, we only need to add the name of the folder where you store the program to the path. :

require( dirname( __FILE__ ) . './wordpress/wp-blog-header.php' );

After saving, you can open the program by directly accessing your domain name

Go to the WordPress installation background, in the general settings, in the "Site Address (URL)" column, remove wordpress after the address, as follows:

Siteurl:  http://xxx/wordpress
Home:  http://xxx
Copy after login

You're done, call it a day!

Recommended tutorial: WordPress tutorial

The above is the detailed content of How to remove /wordpress from WordPress path. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
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