This is first time developing website using Wordpress. While importing pages and posts on localhost using wordpress import plugin, I encountered following error.
Unable to create directory uploads. Is its parent directory writable by the server?
I tried changing wp-content folder's permission to 777 -> didn't work
I tried changing ownership of wp-content folder to apache:apache -> didn't work
I tried manually creating uploads folder under wp-content. With this change, I was able to pass the above error, but then I got the following error.
Sorry, there has been an error. The uploaded file could not be moved to uploads.
What else should I try to import Wordpress xml file?
Why the Wordpress cannot create uploads folder?
You can check the web server's temp directory for PHP.if the apache:apache has no permission on this directory,you can't move tempfile to uploads.if so,you can change the permission of the web server's temp directory.
Related
Starting from yesterday (judging by the error logs), out of the blue, we notice the following error on the site:
PHP Fatal error: Cannot access property WP_Hook::$callbacks in …/public_html/wp-includes/class-wp-hook.php on line 77
The site is working (possibly thanks to the caching plugin), but all attempts to login to admin panel cause the error 500.
We recovered the site from a backup from 6 of March (when the last successful login was), but the error persists.
We also tried to deactivate all the plugins (by renaming the folders via FTP), but still the same error. (Now the work of plugins is recovered from a backup.)
The hosting could not help to solve this problem.
Where to look next?
Site: http://russificateschool.com/
Thank you in advance for the help.
Removing and uploading wp-includes from a fresh WP package solved the problem.
You'll want to overwrite your existing wp-admin and wp-includes folders with baseline versions.
First, get the version number of your Wordpress install by FTPing into
your web host where Wordpress is installed.
Download the wp-includes/version.php and view it, you'll see the version number.
Go to https://wordpress.org/download/releases/ and download the gz or zip file for your version.
Unpack the zip file that you downloaded. This will create folders for wp-admin, wp-content, and wp-includes with other files.
On the web host, rename your wp-content/plugins folder to wp-content/plugins-bak.
On the web host, delete the old wp-includes and wp-admin directories.
Upload the new wp-includes and wp-admin directories to your web host, in place of
the previously deleted directories.
Upload the individual files from the new wp-content folder to your existing wp-content folder, overwriting existing files. Do NOT delete your existing wp-content folder. Do NOT delete any files or folders in your existing wp-content directory (except for the one being overwritten by new files).
Upload all new loose files from the root directory of the new version to your existing wordpress root directory.
Test your site to see if it loads. If it does, on the web host, rename your wp-content/plugins-bak folder to wp-content/plugin.
I know there's a lot of similar topics, but none of them is solving my problem.
I just downloaded a website from my computer as localhost to a server.
The problem is I don't see any of images which were downloaded on the server with WordPress on my local computer. And if I try to upload them directly through the admin panel I get this error:
Missing a temporary folder.
I tried configuring php.ini and setting a temporary folder for uploads
I don't have any public_html folder
The permission rights are OKAY
And also I had another error earlier (but I don't know what happened) uploading to the wp-content/uploads folder.
UPD: RESOLVED! Just needed to check twice if there is no ; on the line before upload_tmp_dir and if the path to the temporary folder is written as a string.
I uploaded my Yii 1.1.14 project on remote server and found that images in upload dir are not shown.
Image in "images" directory like:
http://remote-server.com/tybapp/assets/mine/images/delete.png
is shown ok
Image in "uploads/" directory like:
http://remote-server.com/tybapp/uploads/cms_items/-cms_item-43/5cd790612da5.jpg
are not shown and copied to browser it showes error
Unable to resolve the request
"uploads/cms_items/-cms_item-43/44c9cc2b1edd.jpg".
Is it access error or what? On local server it worked ok.
As for access I tried to set access 0755 to all dirs and files or 0755 to all dirs and 0644 to all files - with the same result.
Can it be that I have to edit my .htaccess for skipping images from yii pages routings ? If yes in which way ?
Check folder permissions and try giving permission to uploads folder. Always make sure to give permissions when uploading to server.
I move drupal 7 from server(live Site) to my localhost(xampp). I change settings.php(files/defualt/settings.php) for database connection and remove cache from mysql database. now in load index, i see my website without css design(only text) and see this error :
**Error message**:
The file could not be created.
The file could not be created.
The file could not be created.
The file could not be created.
The file could not be created.
I think drupal not create css/js compression files. How To Fix This Error? Thanks For Any Help.
While running MAMP
found answer from here:
http://drupal.org/node/581558#comment-6202892
Went to: admin/config/media/file-system
changed "/tmp/php" to "tmp/php" and problem was solved.
similar to the other answer it was a problem with my file system setup. The tmp directory in my live site is in a folder outside the public_html folder.
so I just created a new tmp directory inside my directory structure
and
went to admin/config/media/file-system and
set the tmp folder to point to that new tmp folder.
It seems a permissions problems, after you cleared the drupal cache, all the css and js files needs to be recreated in sites/default/files (or sites/yourdomain/files), check the web users has permission to write in this directory.
You need to give your "Temporary directory" to write permission. From admin-> config -> file system
First Check whether the Temp Folder is available in your sites/default/files directory or not.
If Temp Folder is not available then create the Folder and give the correct access permission to that folder.
If Temp Folder already available there then check the permission of the folder.
I am creating a wordpress plugin that needs to be able save a file. What is the best way to do this without worrying about file permissions. (i.e Is there a directory that is considered safe to write to?)
If you can upload images to your blog, then wp-content/uploads should be writable.
But file permissions are always something to worry a little about when you're deploying to a new server.
Normally you can create a directory with mkdir(), mermissions to chmod(777) so you can delete this directory from ftp without a root user and this dir will bee fully writable via php. And also chmod you files with 777, otherwise you can't delete without root permissions.