When we put the WordPress program in the root of the space in the form of a folder, we need to add the name of the folder when visiting the website http://www.xxx.com/wordpress , you can’t access it by using the domain name directly. The solution is as follows:
1. First of all, in the program (in/var/www/HTML/WordPress), the“ index.php ”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’ );
2. In fact, we just need to add the folder name of your program to the path
example:
require( dirname( __FILE__ ) . ‘./wordpress/wp-blog-header.php’ );
Generally, you can go to the previous step to perform the third step.
If you find that the site opens blank after saving, just change the above sentence to the following:
require(‘./wordpress/wp-blog-header.php’);
3. After saving, you can open the program by directly accessing your domain name
But after such modification, when you open a page in the website, there is WordPress in the address bar. You need to make the following modifications:
To the installation background of WordPress, in the general settings
In the “site address (URL)” column, remove the WordPress after the address, as follows:
WP in database_ Make corresponding changes in options:
change to the following form
Siteurl: http://xxx.xxx.xxx/wordpress
Home: http:/xxx.xxx.xxx/
Reference 1
reference 2
Read More:
- Three methods of how to remove the flashback of running result box in VS
- How to remove the message “Membership credential verification failed.” displayed in the Event Log
- Solve the problem of “A TimThumb error has occured” in the WordPress program
- Prompt 550 remove directory operation failed when FTP delete folder
- express nodejs Failed to lookup view error in views directory (How to Fix)
- WordPress website map sitemap.xml error repair
- How to Fix unexpected directory layout in go language
- Link: fatal error lnk1123: failure during conversion to coff: file in
- In Python, print() prints to remove line breaks
- Solution to communication link failure with error in idea startup project
- How to solve the problem of “unable to open include file:” graphics. H “: no such file or directory”
- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure (How to Fix)
- Wamp install WordPress prompt can’t select database
- Remove spaces after characters in Excel cells
- How to remove the title bar (using the request window feature)( Window.FEATURE_ NO_ Title); why it fails)
- Mac bigsur cannot create other directory solutions in the root directory (M1 chip is also applicable)
- Change the path in the user directory in Chinese Ubuntu to English
- WordPress cannot install themes and plugins online: wp_remote_post failed:
- R language-Error in file(out, “wt”): Unable to open the link problem solved
- How to add directory plug-ins to jubyter notebook