Can't delete or install plugin in bitnami wordpress

[IMPORTANT, please fill the questions]

  • Application name and version: Bitnami wordpress for AWS, latest

  • Is it an installer, cloud image or virtual machine?: virtual machine

  • Operative system/Platform (Linux, Windows, OSX)(x86/x64): Linux

  • Was it installed as the root user? As 'bitnami'

  • Is there anything you've done and/or tried with the application before posting here?
    E.g. changed permissions or installed a plugin:

We assume you are using Bitnami to deploy your application.
Describe here your question/suggestion/issue and how to reproduce it.

After deploying, I replaced all files in 'wordpress' folder with my own files, and also copied the FTP configuration in wp-config into my wp-config. Then when I try to delete some plugins, it kept loading in that delete plugin page, and finally showed nothing.
I checked the log file, it shows as follows:
Wed Aug 3 14:24:23 2016 [pid 2417] CONNECT: Client "127.0.0.1"
Wed Aug 3 14:24:23 2016 [pid 2416] [bitnamiftp] OK LOGIN: Client "127.0.0.1"
Wed Aug 3 14:32:52 2016 [pid 2420] [bitnamiftp] FAIL RMDIR: Client "127.0.0.1", "/opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/xxxxxx/"
Any suggestions?
Thanks.

If you migrate your files from another destination, there are 2 things you need to do:

  • Correct the permissions:
sudo chown -R bitnami:daemon /opt/bitnami/apps/[instance name]/htdocs
sudo chmod -R g+w /opt/bitnami/apps/[instance name]/htdocs
  • Include your FTP credentials inside the wp-config.php file, like this:
define('FS_METHOD', 'ftpext');
define('FTP_BASE', '/opt/bitnami/apps/wordpress/htdocs/');
define('FTP_USER', 'bitnamiftp');
define('FTP_PASS', 'yourawesomepass');
define('FTP_HOST', '127.0.0.1');
  • if you don't have an ftp account pass, here's how to (re-)set it through ssh:
sudo passwd bitnamiftp
  • ...you will be asked for a new password of your choice.

Best of luck!

2 Likes

Hi @bulgaru

I replaced FS_METHOD with

define('FS_METHOD', 'direct');

But now my website is not working, I'm getting 500 error.
I reverted back to 'ftpext', still not working.

Here's a part of my wp-config.php

define('FS_METHOD', 'ftpext');
define('FTP_BASE', '/opt/bitnami/apps/wordpress/htdocs/');
define('FTP_USER', 'bitnamiftp');
define('FTP_PASS', '********');
define('FTP_HOST', '127.0.0.1');
define('FTP_SSL', false);

What could possibly the problem?

@khateeb321,

Usually i face this problem if i mistyped accidently a character, forgot to close some quotes or forgot a semi-colon somewhere. A good starting point would be a back-up of wp-config.php file. This is my best guess at the moment.

I thought the same, but now it is screwed up somehow :slight_smile:
What the possible solution now? I don't have a backup file.

@khateeb321

You can check out this reply.

Basically you have a vanilla wp-config.php file. All you have to do is migrate your url paths, passwords and other specific configurations there and you're all set up. Keep in mind that some editors might screw around with your file, by inserting "magic quotes", etc. Best to use something very simple for editing, like Notepad on Windows.

Thanks for the quick reply, let me hit and try.

@bulgaru

Now I'm getting Database connection error.

@khateeb321,

You need to include your DB credentials. I hope you have a copy of the wp-config.php that gave you error 500. Copy db credentials from there.

I did actually, still not working.

@khateeb321,

Make sure the port is correct

define('DB_HOST', 'localhost:3306');

and table prefix is correct

$table_prefix  = 'wp_'; // your prefix can be different from the default one

@bulgaru I'm out of luck. I've tried restarting MySQL server too. Not helping.

@bulgaru I tried connecting to MySQL Server locally using mysql -u root -p

It gave me this error "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/bitnami/mysql/tmp/mysql.sock' (2)"

Hey @bulgaru

I'm getting this error in phpmyadmin

2002 - No such file or directory — The server is not responding (or the local server's socket is not correctly configured).

This might help you helping me

@khateeb321,

To be honest, i've never seen such a problem before. Seems like your stack got messed up. Can you still access phpMyAdmin? If yes - back-up your site, kill the server, create a new one and migrate your website there.

At least this is what i would do.

Oh snap! Well, I think this is the only solution now.
The problem is, I cannot login in to phpmyadmin and mysql doesn't start at all!

Hi @khateeb321,

sorry for the late response, could you please share with us the content of the log file of MySQL? You will find that file at /opt/bitnami/mysql/data/mysqld.log.

What did you do before this message? Did you change any configuration files of MySQL before running into the issue?

Regards,
Jota

Hi Jota,

MySQL instance was totally messed up, I might have done something stupid somewhere.

I've most my application to another VM and deleted the old one. I'm still on Bitnami LAMP stack, will ask your help if needed. :smile:

Thank you!

Hi @khateeb321

Ok, feel free to post here if you have any other question!

Regards,
Fran

Thanks mate,

You saved me plenty of time and search.