简体   繁体   中英

WordPress files not seeing /~username/ on localhost

I have a localhost running on localhost/~frederoover/ , everything works perfect, but when I install a WordPress website, I'm getting the following issue's.

localhost/~frederoover/agri-travel.be loads just fine, but the internal files all give a 'Failed to load resource: the server responded with a status of 404 (Not Found)' and they are pointing to localhost/wp-content/plugins/* . So WordPress doesn't see my /~username/.

Any thoughts on how to solve this?

在此处输入图片说明

Your site URL is incorrect. The easiest way to fix this to add this to your wp-config.php and load the home page:

define('RELOCATE', true);

Make sure to remove it after you are finished.

Step 1: Export your database as .sql open the file using text editor. find the http://localhost and replace with http://localhost/~frederoover/sgri-travel.be and again import it. This will work.!

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 ( http://localhost/~frederoover/sgri-travel.be in your case ). 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.

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