Tessando
asked on
How to Use ".wp-config.php.swp" to Create wp-config file
I've got a client who's running Bitnami Wordpress using AWS Lightsail.
When I go to the page, it's completely white. I thought this was pretty unusual behavior so I did some Google-Fu and found a known permissions issues that has to do with Group and Ownership.
This requires adjusting the ownership of the wp-config.php file, a normal file that should be located at the root of Wordpress.
It's not.
Which is frustrating.
When I locate it using this command: locate wp-config.php
I find it in a swap file form: e.g. 2COMPANYNAME.com/.wp-confi g.php.swp
at
/opt/bitnami/apache2/var/c ache/mod_p agespeed/v 2/COMPANYN AME.com/ht tp
How can I take that ".wp-config.php.swp" and move it to "~/apps/wordpress/htdocs", which is where index.php is for some reason and where I expected to find the "wp-config.php" file.
Thanks for your help.
Thom
...
When I go to the page, it's completely white. I thought this was pretty unusual behavior so I did some Google-Fu and found a known permissions issues that has to do with Group and Ownership.
This requires adjusting the ownership of the wp-config.php file, a normal file that should be located at the root of Wordpress.
It's not.
Which is frustrating.
When I locate it using this command: locate wp-config.php
I find it in a swap file form: e.g. 2COMPANYNAME.com/.wp-confi
at
/opt/bitnami/apache2/var/c
How can I take that ".wp-config.php.swp" and move it to "~/apps/wordpress/htdocs",
Thanks for your help.
Thom
...
ASKER
Thanks David. I love that VI trick and I am able to open multiple config files on the Clients server with VI, so we're good there.
What I can't seem to do is find the dang thing.
What do the commas mean in the results of this locate statement?
In other words, when I go to "/opt/bitnami/apache2/var/ cache/mod_ pagespeed/ v2/COMPANY NAME.com/" I cannot get to http, even as "sudo". I just haven't encountered those commas before.
Thanks!
What I can't seem to do is find the dang thing.
What do the commas mean in the results of this locate statement?
/opt/bitnami/apache2/var/cache/mod_pagespeed/v2/COMPANYNAME.com/http,3A/,2COMPANYNAME..com/.wp-config.php.swp,
In other words, when I go to "/opt/bitnami/apache2/var/
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you have a .wp-config.php.swp this is an editor swap file which might or might not be useful.
This file is a binary version of your file in a format only the original editor program can understand.
You can attempt recovery of your wp-config.php file like this.
Open in new window
Note: It's super rare for vi to die, unless to OOM Killer kills it or the machine reboots while vi is running.
In either case, you should still be able to see your wp-config.php file in the correct location.
If this is true, then you will remove the .swp file completely, as saving it may destroy the wp-config.php file your site is currently using.