0

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.

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

4 Comments

Nope, doesn't work. In fact, I've already change my siteurl and my home before this, but the result is the same. I think have a problem to the redirection, but i'm not sure.
@KevinPy Ok then, try this. Export your database as .sql open the file using text editor. find the http://your.old.url and replace with http://your.new.url and again import it. This will work.!
I solved the problem. The permalinks doesn't work, except ?=1. That's works, but this permalink structure is not cool.
Update permalink as said in step 3

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.