Good day,
I'm trying to install plugins in a new wp theme but it always asks for FTP
Information. After reading different blogs, this is what i have done:
I added define('FS_METHOD', 'direct'); in wp-config.php file
I set the permission of the project folder and all inclosed folders to read and write
But all the above failed to solve my problem.
I'm working on a Mac, with Sierra as operating system and I'm using Xampp.
Check the attached picture.
Kindly help
Regards
The easiest way to solve this problem is add the following FTP information to your wp-config.php
define('FS_METHOD', 'direct');
define('FTP_BASE', '/usr/home/username/public_html/my-site.example.com/wordpress/');
define('FTP_CONTENT_DIR', '/usr/home/username/public_html/my-site.example.com/wordpress/wp-content/');
define('FTP_PLUGIN_DIR ', '/usr/home/username/public_html/my-site.example.com/wordpress/wp-content/plugins/');
Related
Running an instance of Bitnami Wordpress on AWS Lightsail. Getting the following screen when trying to activate a Wordpress theme (JobCareer):
UPDATE #1 Turned on debug and saw the error information in the above screenshot.
Other themes and plugins I have tested all installed and activate without issue, so it's probably something specific to this theme.
I have made sure that define('FS_METHOD','direct'); is set inside wp-config.php file.
The wp-content folder and sub-folders/files are all chown to bitnami user and have the appropriate permissions (folder:755 & files:644).
At a loss as to what else to try. Thanks for any help you can provide! :)
It's definitely a files & directories permission issue. Move the define('FS_METHOD','direct'); line back to where it was (that change is causing a different error).
The 'www-data' user is the default user for Apache (and other HTTP servers?), in case you didn't know.
I am getting the following error
Unable to create directory /wp-content/uploads. Is its parent
directory writable by the server?
whenever I try to upload images via the Media tab in Wordpress. I am running on a LAMP setup, specifically on Ubuntu with Wordpress version 4.1.1. I'm working on a localhost site otherwise I would provide a link. I've tried all of the solutions that I have found and so far, none of them have worked.
Things I've tried:
I recursively changed the permissions of the wp-content folder to 777. (I'll downgrade the permissions to a safer setting after this problem is solved.)
I changed the group owner of the uploads folder to www-data as seen in this solution so that Apache would have group ownership of the folder.
I deleted the .htaccess file and resaved the permalinks setting.
I tried changing the uploads path in wp-config.php.
I asked this same question on the Wordpress forums and received one answer that I tried, but it didn't work for me. At this point I have no clue what to try. If anybody has an idea of what I need to do to get this to work it would be greatly appreciated.
When permissions or files become corrupted, it can often be worth re installing the WP core files from scratch, I recommend downloading the WP files from the codex site.
We often help clients with support via hangouts, please look us up at https://plus.google.com/+Myfavoritewebdesigns https://plus.google.com/+JoshuaJacoby/posts
Thanks!
My Favorite Web Designs
Joshua Jacoby
1006 N. 92nd Circle
Mesa, AZ 85207
Office: 480-335-1330
AZ WordPress Designer
Im trying to install som plugins on my WordPress site but Im gettin the error message halfthrough the progress:
"Downloading install package from https://downloads.wordpress.org/plugin/responsive-lightbox.1.4.4.zip…
Unpacking the package…
Could not create directory."
The site is hosted as localhost and Im using phpMyAdmin as database if that's to any help.
The plugins map is inside the wp-content map. I have given access so it can be overwritten and edit by anyone. But it seems not to fix my problem.
Before I could upload I had some problem with FTP. WordPress kept asking me for FTP but I shut it off by adding
<?php
define('FS_METHOD', 'direct');
?>
in the "functions.php" file. Don't know if that's critical to my problem, but just mention it to be on the safe side.
So, how do I solve this problem about plugins?
Thanks!
yours sincerely,
winterwind
Put this line of code in your wp-config.php right below your database credentials, not in the functions.php.
If this problem still occur change the permissions in your wp-content folder (and subfolders to 777 (only on localhost) by doing this in your wordpress-folder:
chmod -R 777 wp-content
This is kinda dirty, but works fine on localhost.
I had my server setup just fine to allow me to update plugins, themes, and the core via the nice buttons WordPress provides. However, after upgrading to 3.8 I have not been able to upgrade anything. However, I also added iptables to the server around the same time but I don't think this is the issue - I shut off iptables and tried but didn't have any success.
When I attempt to upload the plugin/update via WordPress's FTP it can't connect via localhost. Both 127.0.0.1 and the public IP return the "unable to locate wordpress content directory (wp-content)" after a long, long time suggesting a timeout or several timeouts.
Environment:
WP 3.8 (multisite, subdirectory)
Ubuntu 12.04 server
vsftpd (so I can FTP my user)
Way back when (when I didn't know what I was doing) I changed the whole /var/www/ directory permissions to gabe:gabe. I have since tried changing the wp-content dir to gabe:www-data and www-data:www-data without success. I have also tried using chmod 777 on wp-content, again without success.
I have googled and the vast majority of the fixes come down to permissions. However, as I stated above I've tried changing the owner and the permissions to 777 for the directory. So, I think permissions is a dead end.
I originally thought iptables was somehow getting in the way. But I've shut it off/flushed the table without success. So I don't think iptables is the culprit.
The other googled solutions amounted to adding some code to the wp-config.php file. However, one of those broke the site entirely. Another had no effect.
The logs for Apache and the domain show nothing. They aren't empty but there isn't a single reference to wp-content or anything I can think of that would be related. The ftp logs show that a connection was successfully established via 127.0.0.1.
So I've used up my bag of tricks at this point.
------------- Edit: Alterations I made to wp-config -------------
Per http://wordpress.org/support/topic/unable-to-locate-wordpress-content-directory-wp-content I changed the wp-config.php to include:
if(is_admin()) {
add_filter('filesystem_method', create_function('$a', 'return "direct";' ));
define( 'FS_CHMOD_DIR', 0751 );
}
This was a solution presented for the same problem back in WordPress 2.8 some 4 yrs ago. The site wouldn't load after adding these lines and given the age of the post/solution I took them out and did no further troubleshooting on why the site wouldn't load. I assumed it was calling some function that wasn't present in WP any longer.
The second piece of code I added to wp-config.php was:
putenv('TMPDIR='. ABSPATH .'tmp');
define('WP_TEMP_DIR', ABSPATH . 'tmp');
Per http://wordpress.org/support/topic/unable-to-locate-wordpress-content-directory-wp-content?replies=15. This didn't break the site but didn't fix it either so I removed it.
Adding this line to my wp-config.php worked.
define('FS_METHOD', 'direct');
I have a local development environment on an Ubuntu server.
Try adding this line into your wp-config.php, it works for me
define('FS_METHOD', 'ftpsockets');
define('FTP_BASE', 'xxx');
Replace the xxx with your ftp home path e.g /opt/htdocs/wordpress
Try this one:)
//* FTP Settings **/
/** wp-content path */
define('FS_METHOD', 'ftpext');
define('FTP_BASE', '/');
define('FTP_CONTENT_DIR', '/wp-content/');
define('FTP_PLUGIN_DIR', '/wp-content/plugins/');
define('FTP_USER', 'testdomain4.com');
define('FTP_PASS', 'XXXXXXXXXXXX');
define('FTP_HOST', 'ftp.enterpriseit.us');
define('FTP_SSL', false);
see http://codex.wordpress.org/Editing_wp-config.php
Points to check (If you have not already):
1. Check if you are able to login using FTP client.
2. Whether it is changing the folder to WP folder when ftp user logs in.
Some points which may help you in cross checking your settings:
You may have to create a ftp user whose home folder is your WP installation.
When WordPress logs in to FTP, it should the home folder of WP installation.
Check this URL, this will help you.
http://blog.noizeramp.com/2008/09/10/wordpress-unable-to-locate-wordpress-plugin-directory/
If you are not sure how to create user or assign home folder, there are many sites which explain.
Below is one of them:
http://www.cyberciti.biz/faq/howto-change-default-home-directory/
After creating user, make changes in wp-config.php as below.
define( 'FTP_USER', 'username' );
define( 'FTP_PASS', 'password' );
define( 'FTP_HOST', 'ftp.example.org:21' );
Goodluck!
on a debian based system, after wordpress installation from debian packages, i had to change the owner and group of directorys from "root" to "www-data" in /var/lib/wordpress/wp-content/
eg.
sudo chown www-data:www-data /var/lib/wordpress/wp-content/ -R
to make the directorys writable for the webserver.
I'm new to php as well as wordpress however because of some need I had to work with wordpress only. So just to start I read a tutorial and created a wordpress theme of my own and when I tried to upload my theme I got the below error:
The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature
Searching for the same I've found that usually the cause of such an error is maximum available space or upload file size issue. However since I'm working on localhost I don't think it could be the case. Moreover I've increased the upload_max_filesize, post_max_size and memory_limit as well. But still I'm getting the same error.
I'm using Wordpress 3.5.2.
This error due to you are trying to upload Other than ZIP Compressed version. Other format is not supported while uploading the plugin in wordpress.
You should unzip your plugin and make sure you compress with ZIP format and upload it will be working fine.
One of simple alternative is to download theme package, upzip it and upload through FTP whole theme folder into
/wp-content/themes
Then go to Admin CP and switch to new installed theme.
please check that only those file are here that you wan to upload. i was getting same problem, then i search on folder, there was already zip folder in it. after uploading that zip file. the problem was solved. Now the themes is activated.
I had this problem while trying to install Wordpress plugin from the Wordpress interface. Turns out the disk space quota was full for that specific account. I went to WHM manager and increased the quota and the problem was solved.
I got this error when I had the zip-plugin not installed. For Ubuntu/Debian and php7.4 (Bionic) you can use
apt-get install php7.4-zip
service php7.4-fpm restart
I had a similar problem when I was installing plugins for a theme. It appeared that in the meantime plugins' download url had changed, updating it solved the problem :)
I found one more case which may help you.
It throws the same error if the zip file is incomplete or corrupt.
This is because you are uploading the theme as a ".rar" file.
Convert the theme into ".zip" file and then upload it to your site.
For converting into the ".zip":
Right-click on the folder of your theme folder.
Select "Send to".
Click on "Compressed (zipped) folder".
Upload ".zip" file to your WordPress site.
I had the same issue, it turned out the problem was that the virtual server had exceeded its quota. (I'm using Virtualmin, and had a 1GB quota on that website's virtual server).
After increasing the quota, the problem went away.