Wordpress Migrate on subdomain


When working with WordPress, 404 Page Not Found errors can often occur after migrating a website in a sub directory or when a new theme has been activated or when the rewrite rules in the .htaccess file have been altered.

To migrate a Wordpress website follow the complete process in this article (in french): http://www.tophebergeur.com/tutoriels/wordpress/migration-wordpress-pc-v...

To migrate in a sub directory, be careful to adjust the permalinks and the htaccess file.

Htaccess file

This article https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory will give the full instruction to point your home site's URL to a subdirectory.

Adjust permalinks

When this solution is not enoug follow those instructions:

Option 1: Correct the Permalinks

  • Log in to WordPress.
  • From the left-hand navigation menu in WordPress, click Settings > Permalinks (Note the current setting. If you are using a custom structure, copy or save the custom structure somewhere.)
  • Select  Default.
  • Click Save Settings.
  • Change the settings back to the previous configuration (before you selected Default). Put the custom structure back if you had one.
  • Click Save Settings.
  • This will reset the permalinks and fix the issue in many cases. If this doesn't work, you may need to edit your .htaccess file directly.

Option 2: Modify the .htaccess File

Add the following snippet of code to the top of your .htaccess file:

# 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]
# End WordPress

If your blog is showing the wrong domain name in links, redirecting to another site, or is missing images and style, these are all usually related to the same problem: you have the wrong domain name configured in your WordPress blog.