Tag Info

Hot answers tagged

19

Set file permissions On Mac OS X (Leopard), the Apache HTTP Server runs under the user account, _www which belongs to the group _www. To allow WordPress to configure wp-config.php during installation, update files during upgrades, and update the .htaccess file for pretty permalinks, give the server write permission on the files. One way to do this is to ...


13

If you edit your wp-config.php file you can preload these FTP settings as constants read by WordPress. Keep in mind, on a shared host, you should be mindful of possible security implications. See Editing wp-config.php for more information. Your settings will vary, but these work for me and my hosting setup. I've included some of the unused constants, ...


12

The solution I found that worked on my Mac running the builtin Apache2 was to add this to 'wp-config.php' define('FS_METHOD','direct');


10

Check your file ownership. When the user that apache runs as can write to the wordpress directories, then the integrated upgrade process all just works without ftp. The FTP credentials are for if the web server doesn't have the right priviledges on your files, then wordpress prompts you for your FTP details, and attempts to use those to FTP back to the same ...


7

WordPress does support making connections using SSH (aka SFTP) via the built in updater system. It got this support in version 2.7, approximately 6 years ago. Reference: https://core.trac.wordpress.org/ticket/7690 If you're not seeing it in the normal "credentials" screen, then this is because your PHP installation lacks the support necessary for it to be ...


6

You can save this information on your wp-config.php file: define('FTP_HOST', 'ftp_host'); define('FTP_USER', 'ftp_username'); define('FTP_PASS', 'ftp_password'); More info (WordPress Codex)


5

If you're on a shared server, it's unlikely your host will correct this issue, but you can add the upgrade constants to your wp-config file so it will at least stop asking every time.


4

It seems that not only does WordPress check if the directories are writable, but it checks if the Apache user OWNS the directories (or at least, if the Apache user owns the temporary file it creates). Observe these lines of code at /wp-admin/includes/file.php: get_filesystem_method(): if ( $temp_handle ) { if ( getmyuid() == ...


4

Sorry for posting the question above, I fixed it right after posting here, by following these steps I found on this site http://artofsimplicity.co.uk/wordpress-ftp-auto-upgrade-on-ubuntu sudo apt-get install vsftpd sudo useradd wordpress sudo passwd wordpress # set password for wordpress when prompted. sudo usermod -g www-data wordpress sudo chmod -R g+w ...


4

Parts of WordPress use (s)FTP to transfer files. Updates, for example, use (s)FTP. Media uploads do not, at least not unless something has changed in 3.7. If you are connecting to an (s)FTP server you have to provide the credentials that that server needs. Your file permissions won't come into play until after that connection is made. There are constants ...


4

Here's a much better solution: Don't edit the theme's functions.php file. Don't put your custom code into that file either. If you have snippets of code for a site, put them into a custom plugin. Put each one into its own plugin, in fact. Separate them by functionality. I even made a handy dandy plugin to make this easier, called Pluginception. The nice ...


4

This is a permissions issue. wp-content/plugins must be writable by the web server user.


4

Short answer: yes you can upgrade your plugins via FTP. Download the new version of the plugin. Disable the plugin you are about to update. Upload files over the top of the plugin. Re-enable plugin If the plugin is written well stats, settings and options should remain intact. As Rarst has already mentioned the automated upgrader just overwites files. ...


4

define('FS_METHOD', 'ftpext'); define('FTP_BASE', '/path/to/wordpress/'); define('FTP_CONTENT_DIR', '/path/to/wordpress/wp-content/'); define('FTP_PLUGIN_DIR ', '/path/to/wordpress/wp-content/plugins/'); define('FTP_PUBKEY', '/home/username/.ssh/id_rsa.pub'); define('FTP_PRIKEY', '/home/username/.ssh/id_rsa'); define('FTP_USER', 'username'); ...


3

Depending on your version of OS X, you will need to configure and run FTP and open a port in the firewall. It's best if you google your OS X version - 10.6, 10.7, etc. - specifically and find the docs necessary to set up FTP and Sharing. You also need to realize the security implications of opening up FTP to your local machine; someone port scanning your IP ...


3

You should demand access to ftp or the command line, working without is is crippling and to be blunt, silly.


3

Here are a couple of options: WP htaccess Control - will let you manually edit your .htaccess file All-in-one htaccess Plugin - will let you dynamically create an .htaccess file based on which modules/features you want set up When all else fails, turn to Google ...


3

Of course there are better ways to do that. You could use some local installation with a copy of your online website with software such as WAMP, XAMP, etc to make your changes. "Cow Boy" coding is never a good solution. If you miss one ; boom! Fatal error! And in your case this is live. You could also use better process such as git workflows to have a ...


3

Yes, the plugin @Squideyes suggests you, is perfectly fine, and should do the trick. However, I don't like the link-to-plugin only answers, so here the mine. If you upload the file to a subfolder of the WordPress uploads folder (by default wp-content/uploads, but can be easily changed) than convert a file from there to an attachment post is pretty easy via ...


3

What if you try http://wordpress.org/extend/plugins/ssh-sftp-updater-support/ ? If that doesn't work you can do a quick code change to get the logs with which the developer of that plugin can use do more diagnostics.


3

Try to use relative URLs to your imported css files. So try to remove first / from each import URL: @import url('styles/forms.css'); @import url('styles/tables.css'); @import url('styles/homepage.css'); @import url('styles/reset.css'); @import url('styles/stimenu.css'); @import url('styles/layout.css'); @import url('styles/demo.css'); Also pay attention ...


2

This is most likely because of file permissions on your server. WordPress needs to be able to write to the wp-content folder. I highly suggest you read this article about changing file permissions for WordPress. You may also need to CHOWN the directory that contains WordPress to the user that your web server uses. More here.


2

The wp-admin/includes/file.php **get_filesystem_method()** uses an erroneous test to determine if it can write a file. At line 853: if ( getmyuid() == @fileowner($temp_file_name) ) The use of getmyuid() is wrong for unix - instead that should be posix_getuid(). The problem is the getmyuid() will return the owner of the script file not the user that is ...


2

If a WordPress WXR file, an XML file exported from WordPress, is too large to import, there are several things you might try to overcome that limit. Increase the amount of memory a PHP script may consume. Note: If using a shared hosting service, you may need to ask your host to increase the limit. Increase the memory limit setting in php.ini (e.g. ...


2

What does the content of theme name/include/widget.php ? The error is pointing to line 1 and telling you it did not expect to see ?> there. My guess (without seeing the file) is you have closed a php tag instead of opened it.


2

if you have access to the .htaccess file in your www folder. Just include the following 2 lines in .htaccess: php_value upload_max_filesize 50M php_value post_max_size 50M Other way .. you can place this piece of code in your theme's functions.php file @ini_set( 'upload_max_size' , '50M' ); @ini_set( 'post_max_size', '50M');


2

According to the codex, you should be able to split the XML file into pieces and import them separately. Here is how I would do it. The WordPress XML export file is in a format they call WordPress eXtended RSS (WXR), and looks like this (some lines left out): <?xml version="1.0" encoding="UTF-8" ?> <rss version="2.0" > <channel> ...


2

Posix is a PHP extension rather than part of PHP core. WordPress tries to minimize use of extensions as much as possible in its core. In specific case of Posix one — it has very notable flaw of not being available on Windows platform altogether.


2

This issue is solved. The permission problem has to do with how files are uploaded to the WordPress site while updating. The suPHP solution is my preference at this point because it is simpler and requires less permissions on files, but if you don't want to do that then you'll have to take care to get your FTP user playing nicely with WordPress. suPHP ...


2

I had to also change the owner of the root web directory. chown apache:apache . # or chown apache:apache /var/www/html Edit by Otto: Chloe, as you asked for more information than I could reasonably put into a comment, I'm appending this on to your answer. I hope that is okay. If not, feel free to revert it, or let me know and I will do so. The reason ...



Only top voted, non community-wiki answers of a minimum length are eligible