4

Total newbie here. I'm a pretty good user of applications, but have never written a single line of code. Installed XAMPP and WP, purchased a template from Envato and plan on working on it over the weekend. Followed instructions for both WP and XAMPP, and all seems to be fine. Running solely on local machine, MAC running Mojave.

Go to install the .zip file on WP, and it asks for credentials for FTP. Not sure what I need to put in here, or what to do to change in order to install the .zip file for my template site.

Any suggestions or recommendations are appreciated in advance.

JVN

3 Answers 3

12

Congratulation Jon, welcome to the WordPress world!

To fix the issue, just add the following line of code in your installed WordPress's wp-config.php file. It's a PHP constant declaration which tells the WordPress to avoid the FTP. That's it.

define( 'FS_METHOD', 'direct' );

For more info: https://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants

2
  • Thanks, Obi! I will edit the .php file and insert the code you have provided. Does it matter where I insert the new code into the file? Is there any code that needs to be removed? I thank you for your time, expertise and consideration.
    – Jon V
    Nov 11, 2018 at 13:51
  • You don't have to remove any code and there's no specific place but you can add right after the define( 'WP_DEBUG' ... ); constant.
    – obiPlabon
    Nov 12, 2018 at 3:29
0

In my case Im using a Linux machine (Debian) and I reckon there must be an authorization step included into this process to get the update done. So, this is what I got in the first trial:

Downloading update from https://downloads.wordpress.org/release/wordpress-5.7.1-no-content.zip…

The authenticity of wordpress-5.7.1-no-content.zip could not be verified as no signature was found.

Unpacking the update…

Could not create directory.

Installation failed.

Thanks in advance!

So my solution was Updating WP manually. Here the details to follow: https://wordpress.org/support/article/updating-wordpress/#manual-update

1
  • That normally happens when the user the web server is running as (www-data I think on Debian) does not have permission to write to the WordPress installation files.
    – Rup
    Apr 18, 2021 at 23:37
0

In my case, only adding the 'define' line in my wp-config wasn't working.

I also had to give full permission to admin & everyone to read/write my xampp folder and its subfolder :

  • right-click on the folder itself
  • give permission to modify by clicking on the lock
  • change admin & everyone permission to read and write in the 'sharing & permissions' menu
  • click on the ... below (next to + and - buttons) and select (apply to enclosed items)

I don't know if this is related, but after this change, my MySql Database stopped working. I found this debug for that issue :

  • open terminal and enter : sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start

Hope this helps.

1
  • It's not good practice to give everyone write access to anything on your system, because if they break in some other way as a low-priv user they can then control your WordPress too. It'd be better to make sure the process your site is running as owns the folder instead, or is a member of the group that owns the folder, and use that to set more specific permissions.
    – Rup
    Apr 27, 2022 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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