Skip to main content

Moving a wordpress site issue

Comments

5 comments

  • Infopro
    What is your question exactly? You should find the WP docs of some use I'm sure: Moving WordPress " WordPress Codex
    0
  • Robin Ball
    The WP docs are not really the solution, as mentioned I have moved a site many times. My question is how do I deal with the folders in the root of the domain in regards to cPanel... how do I get the url to point to the WWW folder? After some more research I have managed to get some of the solution but I'm getting an 400 error on some of the site... Any thoughts appreciated.
    0
  • Robin Ball
    Here's the updated .htaccess RewriteEngine on # Change yourdomain.com to be your main domain. RewriteCond %{HTTP_HOST} ^(www.)?DOMAIN_REMOVEDe$ # Change 'subfolder' to be the folder you will use for your main domain. RewriteCond %{REQUEST_URI} !^/www/ # Don't change this line. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Change 'subfolder' to be the folder you will use for your main domain. RewriteRule ^(.*)$ /www/$1 # Change yourdomain.com to be your main domain again. # Change 'subfolder' to be the folder you will use for your main domain # followed by / then the main file for your site, index.php, index.html, etc. RewriteCond %{HTTP_HOST} ^(www.)?DOMAIN_REMOVEDe$ RewriteRule ^(/)?$ www/index.php [L]
    0
  • Jcats
    This is a super ugly solution, why are you going at it this way =X Anyway, the problem is with the path to your actual content, if you go to the site, you will see all 404's for all content, example: So you have to use RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?example.com$ RewriteCond %{REQUEST_URI} !^/www/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /www/$1 RewriteCond %{HTTP_HOST} ^(www.)?example.com$ RewriteRule ^(/)?$ www/index.php [L]
    0
  • Robin Ball
    That's sorted it. Thanks a million jcats
    0

Please sign in to leave a comment.