I am trying to redesign a website from a friend and it's chaotic as hell. Now I am stuck a bit.
The old domain it something like http://www.website.com/folder/
I am trying the get rid out of the "folder", so I changed the setting in the wordpress setting and the root in the web-provider. The whole website is working fine, also the Wordpress admin area. But if I'm trying to get into the "home" page, it won't load - or it is loading endlessly.
Do you have any idea how I could fix it?
Regards and thanks,
Natts
A piece often forgotten is the .htaccess file (found in the root of your WP install); I especially suspect it because you're going from a subfolder to no subfolder.
Back it up, then override it with the default WordPress values (or delete it and go to Settings -> Permalinks in WP Admin)
Default .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
Related
I have moved wordpress site to production server from test server. I have done database, code configuration changes. The strange problem i am facing is if i call my website adding index.php then only it shows the site.
http://www.suziesellsaz.com/index.php
If i directly call using domain name it is not working
http://www.suziesellsaz.com
I have thought problem may be because of .htaccess so i have deleted .htacess and saved permalink and it creates following .htaccess but still no luck.
# 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
Can some one help me solving the issue?
Please check if under Settings > General settings
Both the urls i.e Wordpress Address and Site Address are same.
Last time I had this issue when they were different. Changing them and reseting permalink fixed this issue for me.
I am not sure about this but, Put your htaccess file back and
RewriteBase /
replace with this
RewriteBase /public_html/
and
RewriteRule . /index.php [L]
replace with this
RewriteRule . /public_html/index.php [L]
May be it's the problem of URL rewriting.
Add the below code in .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
Once done then please make sure that the site URL and home URL for your site are set correctly. You can update the site URL and home URL from wp_options table, WordPress configuration file or from the WordPress administration panel.
Once done then please clear the cache of your system and try to access the website.
Let us know how you go.
Thanks to all of you for your valuable help and inputs. I struggled a lot on this issue and able to find the solution following these steps. Hope it will help some like me.
# Always use domain name in lower case.
In my case client domain is "SuzieSellsAZ.com" treat it as "suziesellsaz.com" all lower case.
Use Database Search and Replace Script in PHP to replace all occurence of previous domain.
ref:
https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
Update the siteurl and home URL in database options table and all other occurrence in the database.
Once it done or database update then you should import to any server and it will works fine.
Sometime site post or page URL does not work then go to setting > permalinks and save it. Site post and page URL will work fine.
I have problem with images on my website. I have installed wordpress in blog directory, co I could access my website like mysite.com/blog. I have followed tutorial on this page Giving_WordPress_Its_Own_Directory (Using a pre-existing subdirectory install), to redirect it, so I have changed site address url in settings to mysite.com, add index.php to root and add /blog/wp-blog-header.php in this fileā¦ I also have to update permalinks and htaccess copy to root, with following code
# 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
Now my website is working fine but images are not working. I can see them but after click on them it shows 404 error page. There is /blog/ in image url. If I remove blog from url manually, it shows page with image (lightbox is not working) Could somebody help me how to solve this? thanks
I'd try Better Search Replace plugin to change urls of images in database.
So I have a link on my blog's menu. It's set up to go to a subdomain housing a forum (forum.secdefus). Another link on the menu is set up in exactly the same way and works fine.
However, this link shows as correctly in the bottom let hand corner of Chrome. When I click it, it takes me to http://secdefus.com/forum. (which obviously doesn't exist).
I'm led to believe this is an issue with the rewrite settings in my site's .htaccess, but I'm not sure how to rectify it. You can reproduce this by going to http://secdefus.com and clicking the "Forum" link.
Thanks.
# 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 think this might be more of a webhosting problem. Probably your hoster automatically redirects subdomain.domain.tld to domain.tld/subdomain if the subdomain is not found.
Besides that I can reach your forum via www.forum.secdefus.com, so you might just want to fix the link in the blog menu.
Got an issue with a wordpress site that I've never experienced before. I have moved a site for a client from one server to another (I've done this several times before). The site has moved fine, however none of the images from my uploads folder are displaying. When I check the link, there is no "/" before wp-content, so my link reads like this:
http://www.vimartech.co.ukwp-content/uploads/2014/03/VIMARTECH-INDUSTRIAL.jpg
Here is my .htaccess file which is where I believe the issue lies. Can anyone help me out please.
# 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>
It's because wordpress holds full path to image in it's database.
This also true for configuration entries.
I haven't used wordpress for some time, but in the past I used a simple search/replace script to change old domain to new at doployment stage.
I have moved an Wordpress from one server to another. The address remained the same, so nothing is changed in the URL structure. The steps followed are as described in Codex page.
However when I try to access the admin page (www.mydomain.com/wp-admin) I get a blank page. Also, the same happens to some pages on my site - but not all of them. Some are working some are not.
In my .htaccess I have the usual:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^mysite.com$ [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Under wp-admin folder, .htaccess file is empty.
After a lot of testing, I find out that when I access http://mydomain.com/wp-admin (without www) is loading the login page, but after entering the username and password I get another blank page (it basically redirects to www.mydomain.com).
I believe this is not a .htaccess, but something inside Wordpress. I have the correct URL and HOME setup in wp_config (also because the domain did not changed after moving to a different server).
Strange thing is that some pages are working, some don't. What could be the reason?
I found that the reason for this is a blank space left on wp-config.php file, which made WP crash (not sure why other pages were working though...).