- This topic has 0 replies, 1 voice, and was last updated 1 month, 1 week ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.

Haiti_Home › Forums › IT Support Forum › Wordpress Forum › Installing WordPress and Woocommerce in Linux Ubuntu
Tagged: WordPress
I’m trying to installing WordPress and Woocommerce in my computer for college purposes.
After WordPress installed, I tried to install Woocommerce, but the WordPress asked for FTP user and password.
I asked to the ChatGPT for the solution, it tell me to use these commands below in the shell:
sudo chown -R www-data:www-data /opt/lampp/htdocs/wordpress
sudo chmod -R 755 /opt/lampp/htdocs/wordpress
nano /opt/lampp/htdocs/wordpress/wp-config.php
/* That’s all, stop editing! */
define(‘FS_METHOD’, ‘direct’);
After all, the admin page localhost/wordpress only showed the last two commands.
I tried to fix this using the third command and deleting the last two commands.
Now, the localhost/wordpress is not working.
Someone can please help me?
What can i do in this case?
It seems you overrode the wp-config.php file by inserting only those two lines. This file is essential for WordPress to function at all, as it contains, among other things, the database credentials.
If you made a backup of the file before making this change, restore that backup.
If you don’t have a backup of the file, you have two options:
Try to reconstruct the file manually. You should still have a file named wp-config-sample.php in the same directory. If not, use this one: https://github.com/WordPress/WordPress/blob/master/wp-config-sample.php – you’ll need to rename it to wp-config.php and then enter the database credentials. You may also need to adjust the table prefix if you changed it during the initial installation. Save, and you’re done.
Or perform a complete reinstallation of WordPress. To do this, it’s best to delete the entire directory and the database and start over from scratch.
The actual problem you initially had was that WordPress couldn’t write to its directories and files. There’s also an article about this here: https://developer.wordpress.org/advanced-administration/server/file-permissions/
The latest news on Haiti and the Haitian diaspora around the world
Total views : 4625
Who's Online : 0
Your IP Address : 216.73.217.22
Server Time : April 24, 2026 8:16 am