简体   繁体   中英

Wordpress remove the subfolder in URL

I have a problem with my WordPress installation. I created a WordPress in root folder ( /var/www/ ), and I can access to this folder in a URL with subdomain and subfolder ( http://sub.domain.com/subfolder ). But, when I click on an link, the subolder in URL has been deleted . I don't understand this problem. At the moment, I don't use .htaccess , but I think it is the solution.

Thank you in advance for your response.

Step 1: Open your mysql->you_db_name and open this

step 2: Update siteurl and home

Next you need to change the location of your site in the database.

In wp_options, locate siteurl and home. Usually these records are at the top of the table on line 1 and 2. For siteurl, click the field under option_value and replace the old domain with your new domain name. Press enter to save. Do the same for home.

step 3: Fix permalinks (Optional)

If you experience that you get a 404 error when you try to open links on your site, the Permalinks are broken. Luckily it is very easy to fix this.

Log in to your WordPress dashboard. Click Settings and then Permalinks Scroll down and click Save Changes.

Good luck

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM