I've transferred my wordpress website from my localserver to a folder on my server. It is located in /wordpress. I have created a new database, new user and password and imported. I have also changed the location and home of the website in wp-options. I have changed the wp-config file. I'm still getting a 404 error. I then tried removing all the files, adding a clean install of wordpress then added my theme but still the same error. I can't even access admin or install. Can someone talk a look and tell me what I've done wrong? I have done this before and it normally works fine. Could it be the hosting?
See website here
I've check my .htaccess file and it says the following:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
# END WordPress
Check you're .htaccess file. I had this exact same issue the other day. Because it's in a subdirectory, it's keeping track of that in the .htaccess file, and I'm going to guess the subdirectory on the server is named differently than what it was on your development environment :)
Check you're .htaccess file and if you dont want to do coding in htaccess file.
Then login to wp-admin and go to the permalink section and hit update button
Hope it will solve the problem
Thanks
First of all remove .htaccess file and login in wordpress to run normally, lets check to conform this error due to .htaccess file.
Hope this helps you. Thanks ;)
Related
I’ve changed my custom permalink setting to /%pagename%/ (which is common, I guess). However, the following problem keeps occurring:
When trying to open a post on my website, I receive a 404 error. When changing the permalink setting back to Standard, the errors disappear.
After googling, I found that there is a way to solve this by editing your .htaccess file. Even after this, the same problem reoccurs. As I would like to have clean page-names, would anyone know how to solve this problem?
Greetings,
Tom
Kindly delete your .htaccess file from the root folder and check your site again, if the problem is still there than regenerate the permalinks using %postname%.
For the url rewriting WP feature to work, WP writes the .htaccess file at the root of your WP installation.
Open the .htaccess file and check whether or not you have this piece of 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
If it is missing, you have 2 options:
change the file permissions so that WP can write it.
or add the missing code yourself to the .htaccess.
I am creating a new page in Wordpress, but it returns 500:
http://d4zed.com/test-page/
What could be the reason why? The .htaccess looks pretty standard:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /d4zed-new/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /d4zed-new/index.php [L]
</IfModule>
I really have no idea about how Wordpress works internally (though I have quite an experience in Rails), so I am ready to answer your additional questions.
Thank you!
Internal Server Error in WordPress can be caused due to various reasons. You can try the following options in order to solve the problem.
Checking wrong .htaccess file
Rename .htaccess file. If the site loads after this then you can infer that the problem is due to wrong .htaccess file. So you have to create a new .htaccess file.
Increasing Memory Limit
Create a file named php.ini and paste the code memory_limit = 64M; in it and upload it to WordPress root folder as well as to wp-content, wp-admin folders in order to increase the Memory Limit.
Deactivating plugins
The problem can be caused by an installed plugin. So, by deactivating all plugins and activating one by one you can find out which plugin is making the problem.
Reuploading WordPress core folders
If the WordPress core files are creating the problem, it can be solved by reuploading wp-admin and wp-includes folders.
Contacting Hosting Provider
Contact your hosting provider. If it is a server problem they can help you.
I realized that this question has come up in the past, but I haven't been able to find the solution to my problem.
My wp-admin works fine on my localhost. However, when I migrate to to my live server, I'm no longer able to access it. If I do go to mysite/wp-admin, I get a 404 error.
Some things I've tried:
-Disabling all plugins by renaming the folder
-Deleting plugins one by one
-Changing themes
-Editing permissions to 755 for wp-admin folder
-Adding the below to my wp-config file:
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
Note that when I add these lines I get an error that "this page has a redirect loop".
I used the standard wordpress .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
Does anybody have any idea what the issue might be? Any ideas are welcome.
Thanks!
It looks like you've done the standard troubleshooting tests. Try adding the following lines to your active theme's functions.php file.
function flush_my_rules() {
flush_rewrite_rules();
}
add_action('init','flush_my_rules');
Make sure to keep the following lines in your wp-config.php file.
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
Then try visiting your homepage first, then your /wp-admin/ page. See if you continue to get a 404. If you do, try visiting the /wp-login.php page, and see if logging in via there continues to return a 404.
So I have a wordpress website installed in the root of my domain and it is up and running fine. I want to install a shopping cart in a subfolder but it's giving me trouble. I have a folder called "magento". In that folder is a filed called downloader.php and index.php.
When I try to access the file, Wordpress was giving me a 404 error like it was thinking I meant it to look for a WP article.
I tried a different .htaccess file which changed it to a standard 500 error now.
I've googled for this and found tons of people with the same problem, but haven't found a solution that works. I also checked the permissions and the folder is 777 and I changed the files to 777 as well but it still doesn't work.
The .htaccess file in the root (public_html) file simply shows
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp/index.php [L]
</IfModule>
# END WordPress
I don't know anything about configuring .htaccess files but if anyone has any suggestions on how I can get this to work, that'd be great.
Thanks!!
You can install an empty .htaccess file in the magento subdirectory. This overrides the Wordpress .htaccess file and allows to access the files in that directory.
Never change file permissions to 777. This is dangerous, because it allows anybody to modify your files.
I have moved a site from my test dev to a live server (its wordpress) and for some reason no matter what page I click on only the homepage loads.
Think I have narrowed it down to my 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
and this line in particular:
RewriteRule . /index.php [L]
If I remove this or remove the htaccess completly I get a Forbidden 403 error.
I was hoping someone could help me figure this out?!
Very common issue is redirect plugin. Disable all plugins and post back. Have you got your website in the root folder or is it in the sub directory?
Update:
Changing the Site URL
There are four easy methods to change the Site URL manually. Any of these methods will work and perform much the same function.
Edit wp-config.php
It is possible to set the site URL manually in the wp-config.php file.
Add these two lines to your wp-config.php, where "example.com" is the correct location of your site.
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
This is not necessarily the best fix, it's just hardcoding the values into the site itself. You won't be able to edit them on the General settings page anymore when using this method.
Source
Update:
Goto
wp-config.php
and add
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
Turned out there were a bunch of random files in the root, with the FTP I only had access to the public_html. There were a number of htaccess files and other config files which we cleared out and it solved the problem.