Wordpress Live to MAMP - php

I am having trouble moving a Wordpress installation from my live server to MAMP. So far I have
Copied all the files from the live server to a directory on my local machine (htdocs)
Backed up the database from PHPMyAdmin
Replaced http://www.mysite.com with (http://)localhost:8888/mysite/
Replaced /var/www/vhosts/mysite/httpdocs/ with /Applications/MAMP/htdocs/mysite/
What I see is the homepage working with all the menus and posts there and the admin seems fine however when I click a menu item I get an error message saying:
The requested URL /index.php was not found on this server.
I cannot get past the homepage. Can anyone help? Many thanks in advance.

My best guess is that you've not updated your .htaccess file. You'll need to change your RewriteRules.
This is (probably) because your site was originally on the root of your webserver and now it's in a subdirectory within your MAMP.

Related

Wordpress error 404 not found

I'm having problems with WordPress.
I can see the front page, but when I try to open a link or a picture it always shows the same error:
404 Not Found
The requested URL (X) was not found on this server.
Apache/2.4.18 (Ubuntu) Server at (X) Port 80
I took the WordPress site from one server to my server, and now it's not working on my server and the WordPress in the old server is working, but on mine it is not.
I've tried all of your solutions but I can't get it working.
Any help please?
I believe you have move your website to a new a server. With that being said you need to update your permalink structure. That'll be update your .htaccess and your site will be up and running. Log in to your wp-admin and navigate to Settings -> Permalinks. Review the structure if required and hit Save Changes. Test your site!
Finally i could fix it ,
what i did is to reload de ae2enmod
Command : sudo a2enmod rewrite
Thanks to everyone who helped me.
Walle
set my permissions then uploaded an .htaccess file for the fix.
I didn't have an .htaccess file created on my server, so I made one and uploaded based on this article

Wordpress 500 Internal Server Error with PHP pages in wp-content

I have several plugins that are shooting out 404 page not found errors when trying to load a page in the plugins directory.
For instance:
/wp-content/plugins/test/test.php
When I go to that link, I'll get a 404 page not found error. If I go to a link for a file in the plugins directory, it will load up just fine, i.e. /wp-content/plugins/test/test.jpg
What could be keeping php files from loading? My htaccess is the default. I've tried disabling all plugins. Site works fine in my local development environment, but not on my new GoDaddy dedicated hosting environment. Any help would be hugely appreciated!
First off rename .htaccess to .htaccess.txt as for security it doesn't allow direct access if that doesn't work check the path again

Path in Magento gets wrong when uploaded to webbserver

So I have been developing a e-commerce page locally using Xampp with Magento, it has been going fine until I tested the page on a hosting-site. Something with the paths is wrong.
For example, locally when going to a page it's
localhost/exampleRootDirForMagento/ExampleProductCatagory
But when using a hosting service and I try
example.com/ExampleCatagoryProduct
I get an 500 Internal Server Error. But however if i try
example.com/index.php/ExampleCatagoryProduct
on the hosting service the page loads. But then all the links on the page is wrong.
So in some magically way when I uploaded it to the hosting service the path needs a index.php before entering the the product category. I haven't found anything on this matter so if anyone has any ideas of how this index.php appeared and how to get rid of it, i would be appreciative.
This because Apache rewrite failed. You have to upload .htaccess (get original from magento package or upload one from your localhost) file in your hosting, in magento root directory.

Magento not working after migration server and change URL

I have moved a magento site rackspace windows cloud server to another windows server that have plesk installed.
After migration I have changed my base URL from core_config_data to plesk site preview link and deleted all files from cache folder, Now when I am trying see my site using plesk site preview link firefox giving The page isn't redirecting properly error, on Chrome giving This webpage has a redirect loop error.
I have checked my plesk preview link with other files and see link is working fine but only magento not opening.
Any one know how to fix this?
URL Rewriting depends on your .htaccess file, so there are a couple of things to check:
web/seo/use_rewrites in core_config_data should be true.
when you created your tarball, did it include . files in the root directory especially .htaccess?
If you used tar -cvf archive.tar * then it may have missed them. (Nice "feature" of *nix).
Check that your httpd.conf has AllowOverride All, otherwise your local .htaccess will be ignored.
Did you changed both of "web/unsecure/base_url" and "web/secure/base_url"? if you changed only one - it can be not working.

Why is Wordpress outputting phpinfo() when I try and go to a page?

I have just moved a Wordpress install from a remote host to run on my local development machine. On the remote server it's fully functional.
However, on my development box I can only load the homepage. Other URLs just load a standard phpinfo() page with no errors.
Does anyone know what might be causing this?
It sounds like you are using MAMP or WAMP on your dev box, which will load a default vhost showing phpinfo for any page that does not exist.
Inside wordpress, the settings, in the DB, it sounds like you have Url's "hardcoded" like "http://www.mysite.com" which are not working locally because your "dev" Url is something like "http://localhost"
Whenever using a development server, especially with wordpress, you should setup you dev server as close to your production server. This means you should edit your host file to make it so "http://www.mysite.com" actually goes to your development box or localhost. That way you are viewing everything as it will be when it goes to production.
I had this problem as well following the hosting company re-installing an SSL certificate.
I did some searching and really only found this thread which give me the idea there was a 404 error hiding there somewhere so I checked the php_errors.log file (which I found in the root folder of my site in FTP) - opened that in notepad and found many errors such as:
PHP Fatal error: Class 'WordPressHTTPS_Module_phpinfo' not found in /var/www/vhosts/mywebsite.com.au/httpdocs/wp-content/plugins/wordpress-https/lib/Mvied/Plugin.php on line 385
So - indeed a missing file in the wordpress-https plugin.
To correct, I renamed the folder which contained that plugin (eg wp-content/plugins/wordpress-https to wp-content/plugins/wordpress-https-disabled) - effectively disabling the plugin.
This then allowed me to login to the wordpress admin, install the latest version of that plugin - which worked fine and then deleted the old folder (wordpress-https-disabled)
Everyting was good as gold after that
Hope that helps someone :)
open httpd.conf in text editor
Change;
AllowOveride none
To;
AllowOveride All
I had the same challenge when I cloned my remote site locally.
I fixed it by checking the .htaccess file and correcting this line to point to the right project folder:
RewriteRule . /wordpress/index.php [L]

Categories