0

I was working using a Wamp server installed on my computer and everything was working fine for my Wordpress site. But when I installed a plugin, the entire WP site is gone as it displays "Oops! That page can’t be found."

Status: My Wamp is green, and I can access phpmyadmin and see my database. But I can't establish a connection via localhost to the front or backend of Wordpress. I've also checked my Apache error log and there isn't anything using port 80.

I've tried to use

"define('WP_ALLOW_REPAIR', true);" 

on 'wp-config' but no luck. I m pretty new to this Wordpress development, so please do guide me through how to fix this. Thank you

Here is my .htaccess file

<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>

I have two different Wordpress websites, both of them is working prior to this issue. But after this one Wordpress site went 404, the other Wordpress site suddenly can't read its css files, as the text are still the same.

2

My first step would be to turn on WP_DEBUG in your wp-config.php file.

Edit wp-config.php and add the following lines:

define( 'WP_DEBUG', true );

Then visit your site's admin (example.com/wp-admin) and see if an error appears. More than likely the plugin you just added broke the site, so you can go into your local filesystem (where WordPress is stored) and deactivate the plugin.

  1. Go to your WordPress install (via your File Explorer).
  2. Open wp-content/plugins/
  3. Find the plugin you just activated when things broke. Rename that folder to something else (example: bad-plugin renamed to bad-plugin-1)

Now try to visit your site. By renaming the plugin it forces WordPress to deactivate it and it may bring the site back.

Here are some additional debugging tips for WordPress as well:

Updated Answer

The comments of this answer revealed that the main issue was with the file path leading to the WordPress installation. The file path was localhost/wordpress%20G, but the WordPress site_url parameter was set to localhost/wordpress/.

By visiting the url localhost/wordpress%20G, WordPress was rendered but was firing a 404 error. By renaming the folder to wordpress (removing the space and letter G) the WordPress installation began to work as expected.

| improve this answer | |
  • Thanks Tom, I've tried renaming the plugin, but it does not work. I have also tried setting WP_DEBUG and going to the admin, but all I got was "The requested URL /wordpress/ was not found on this server. Apache/2.4.39 (Win64) PHP/7.2.18 Server at localhost Port 80" – Yuan Lim Dec 2 '19 at 11:57
  • Based on a WordPress.org thread (wordpress.org/support/topic/…) I would recommend trying to visit "your-wamp-website-url.com/readme.html" and see if that renders. If it does, then there is a PHP specific problem. If it still shows the same error, then there is a larger issue with WAMP. – Tom Dec 2 '19 at 13:49
  • Ahh thanks Tom! I can reach my site's readme.html so this means it could be a php error – Yuan Lim Dec 3 '19 at 13:36
  • Great! Since we think it's a PHP error, head over to your WordPress install and open up index.php. Comment out everything in the file and then type something in there to show that PHP is running, like this: `<?php print_r('hello from php'); die();'. If you visit your site and see the message "hello from php", then your server is running fine and WordPress is the issue. If you see no message and an error, then your server is the issue. – Tom Dec 3 '19 at 13:39
  • Ahh I tried printing "hello from php" in the index file, and my site does echo "hello from php". This must be an Wordpress issue – Yuan Lim Dec 3 '19 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.