• Hi guys,

    I’ve been stuck with this problem for a while.

    For testing purpose, my original WP website was build under https://xxx.com/w/
    Now everything looks fine and I want to move the whole website to https://xxx.com/

    I changed the url settings in wp-admin/options-general.php
    And manually moved all files (thru FTP) from /w folder to the upper level folder.

    I can access home page and log in to dashboard no problem. But, problem is,
    All my portfolio pages are showing “404 – Not Found”
    Contact form page too.

    Originally, pages were using url like https://xxx.com/w/portfolio/abc/,
    Now since I changed settings and moved files, I was expecting url like https://xxx.com/portfolio/abc/ could be accessed…. but I only get “404 – Not Found”

    Did I miss something? I’ve tried tools like “WP Migrate DB” ’cause I think it is a database issue… but it didn’t work and I had to undo all the changes..

    I mean now my website is still working under https://xxx.com/w/ I just can’t move it to
    https://xxx.com
    ….

    Any ideas? Thanks in advance!

    • This topic was modified 6 years, 2 months ago by kikicolly.
Viewing 3 replies - 1 through 3 (of 3 total)
  • So you have your site at both locations right now?
    I typically use your method when I am converting a site to WordPress. The existing site stays in place in the root, while I make sure everything is working in a subfolder. When it is ready, I make two minor changes, and then WordPress is controlling the root folder. The process is described at https://codex.www.ads-software.com/Giving_WordPress_Its_Own_Directory which is linked from the Settings > General page.
    (You don’t actually have to move the files, you just copy the index.php and .htaccess files, then edit the index.php file to add the subfolder.)

    What it doesn’t really cover is any links in the content, which will have the subfolder, that you will need to change to remove the subfolder. I use a plugin like Search Regex for this. But the images don’t have to change (since the wp-content folder didn’t move).

    Be sure to save Permalinks so it will write a new .htaccess file and recalculate the rewrite rules.

    Hey @kikicolly,

    Please check your .htaccess file and Go to Settings >> Permalinks and save the page again ??
    Your .htaccess file should look like this

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    Thanks!!!

    Thread Starter kikicolly

    (@kikicolly)

    Thanks guys @arvindsinghu @joyously
    I just find out I don’t have an .htaccess file in my root folder..
    and I tried to upload one, got error messages like “Prohibited file name: .htaccess”
    I’m using yahoo small business account.. seems like they dont allow you to modify .htaccess file or sth..

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘pages 404 – Not Found after changing URL’ is closed to new replies.