Moving a wordpress site issue
Hi All, first time user.... hoping that the cPanel collective genius can help me with this issue.
So, I'm moving a Wordpress site for a friend. Usually not an issue at all, done it a load of times both with a plugin and manually.
This one is a little different... I have never seen this structure in a domain folder before. I have attached a picture.
Here is the contents of the .htaccess file:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^DOMAIN_HIDDEN\.ie$ [OR]
RewriteCond %{HTTP_HOST} ^www\.DOMAIN_HIDDEN\.ie$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^/?$ "http\:\/\/www\.DOMAIN_HIDDEN\.ie\/" [R=301,L]
Usually the wp installation is in the root domain folder.... but this has www & shop in it.
The shop folder holds the ecommerce part of the site, but that's another days work.
Baffled!
Any help would be seriously appreciated as there's a tight deadline.
-
What is your question exactly? You should find the WP docs of some use I'm sure: Moving WordPress " WordPress Codex 0 -
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 -
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 -
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 -
That's sorted it. Thanks a million jcats 0
Please sign in to leave a comment.
Comments
5 comments