I have migrated my wordpress website from my desktop over to siteground for hosting. Prior to doing this I had been using free hosting at x10. The first time I transferred the site everything worked fine. The second time I tried (new version of the website) I found that every page except the home page had a 404 error (this was with x10). I then got hosting at siteground and am still having the exact same problem. Any solutions to this?
My .htaccess file
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /testsite/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /testsite/index.php [L]
</IfModule>
# END WordPress
To fix it
Login to /wp-admin
Go to settings-> Permalinks
and click on save changes button.
when migrate a wordpress site, you should change the wp_options table siteurl and home url,
then login to admin back end -> settings -> permalinks - set the permalinks and save,
Then you can set the .htaccess just set following code and test.
`#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>`
Related
I am trying to move my WordPress site from local to live. In my case homepage is working fine, but while migrating to next page or other menus it shows 404 error. I have changed my .hdaccess file and permalink settings. But it is not working. can anyone give a clear solution to this problem?
My existing .hdaccess file is
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /bookExperts/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /bookExperts/index.php [L]
</IfModule>
# END WordPress
I have changed my .hdaccess as given below
# 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
You need to go to table wp_options and change site_url and home with your new domain name.
after this go to sql tab in phpmyadmin and run below code
UPDATE wp_posts SET post_content = REPLACE(post_content, '{old_domain}', '{new_domain}');
this will fix broken links & images.
Follow these steps.
settings > permanent links > save changes
it's all
Before migrating you must have changed the url:
settings > WordPress address (URL) / Site address (URL)
I have installed Wordpress on my localhost, no links are working. I get page not found.
What can I do ?
Using .htaccess like:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /akclinics/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /akclinics/ [L]
</IfModule>
# END WordPress
If you not able to go /wp-admin just open your database then
Your database-> wp-options table->wp-options->site-url->check and change it.
After Follow this steps once:
This may be caused by the permalink or .htaccess
Go to settings-> permalink-> set it as default ->Reload or refresh
Then again now Go to settings-> permalink->postname
Your .htaccess will get update with the permalink.
Please sometimes all pages are blank pages in my website only the home page and the admin side IDK why but when i refresh the permalinks setting it works.
any one can help me to resolve this problem please
This is usually an issue in the .htaccess from when you have setup your permalinks.
if you are using the postname for your permalinks make sure this code is at the top of the .htaccess.
# 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
I developed a simple wordpress site for a company.
Today they called me and said that some of the pages can't be visited.
So i checked it out , and seems like 3 menu options for apparent reason just stopped working. They said they haven't done any changes.
http://oi40.tinypic.com/ofqcev.jpg
Check the permalink it says says "projektledning" like it should be , and wordpress refuses to find the page.
http://oi40.tinypic.com/16h9mcg.jpg
And i tried for no reason to change the permalink and i've added "-1" to the link and bam its working...
What should i do to make the permalink work as the regular name it should be?
Try toggle permalink once under admin - settings - permalinks. Make sure you're server has write access to your .htaccess file before doing this.
.htaccess should look 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
At the last row, make sure there's a space between . and /
Also check your permalinks for any typos (spaces).
IF your url is foo.bar/something, make your .htaccess look like:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /something/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /something/index.php [L]
</IfModule>
# END WordPress
Hope this helps!
I'm having an issue after moving to a new server where my WordPress htaccess URL rewrites are redirecting ALL links back to the homepage.
Here is my current 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]
</IfModule>
# END WordPress
On the old server I used this htaccess file with zero problems - however the new server I have the problem where ANY URL is redirecting to homepage. If I type the "unwritten" URL in (with the query strings) the page comes up fine.
Two ideas:
http://wordpress.org/support/topic/all-permalinks-redirect-to-homepage-1
Deactivate all plugins an reactivate one by one.
http://wordpress.org/support/topic/blog-posts-redirecting-to-home-page
Click the save button in the permalinks panel.