FCKeditor Image Upload Not Working? Why to Replace It and How to Upload Images in CKEditor 5

If FCKeditor says an image uploaded but nothing appears, check paths and permissions. Then plan to replace it, because its file connector is a common way sites get hacked.

When FCKeditor reports that an image uploaded but it never appears, the cause is usually a wrong UserFilesPath, a disabled PHP connector or a folder PHP can’t write to. You can fix that, but the real answer in 2026 is to remove FCKeditor. It was replaced by CKEditor in 2009, it doesn’t run cleanly on modern PHP, and its file upload connector has been used to upload malicious scripts to many sites. Use CKEditor 5 or TinyMCE with an upload handler you control.

Originally published in October 2010 as a troubleshooting guide. Rewritten in December 2026 because FCKeditor is now a security risk.

Short-term fixes for an old install

If you have to keep an old FCKeditor running for a few more weeks, check these in order:

  1. In editor/filemanager/connectors/php/config.php, $Config['Enabled'] must be true, and $Config['UserFilesPath'] must point to a folder that exists, such as /userfiles/.
  2. $Config['UserFilesAbsolutePath'] must be the full server path to the same folder if your site isn’t at the domain root.
  3. The PHP user must be able to write to userfiles/ and its image/ subfolder. On most current hosts, 755 is enough because PHP runs as your account user. Don’t use 777, which lets any process on the server write there.
  4. Check the PHP error log. On PHP 7 and 8, old FCKeditor code often fails with errors about removed functions, which leaves an empty response that the editor reports as success.

While it’s still in place, protect the connector folder with a password or restrict it to your IP, and add an .htaccess file in userfiles/ that stops PHP from running there:

<FilesMatch ".(php|phtml|phar|phpd)$">
    Require all denied
</FilesMatch>

Check whether the site was already abused

Look in userfiles/ and its subfolders for any .php, .phtml or oddly named files you didn’t upload. Search access logs for requests to connector.php or upload.php from unknown IPs. If you find anything, treat the site as compromised: change passwords, scan the whole codebase and restore clean files.

Replace it with CKEditor 5

CKEditor 5 uploads images through an adapter. The built-in Simple Upload Adapter posts the file to a URL you choose and expects JSON back:

ClassicEditor.create(document.querySelector('#body'), {
  simpleUpload: {
    uploadUrl: '/editor-upload.php',
    headers: { 'X-CSRF-Token': document.querySelector('meta[name=csrf]').content },
  },
});

A minimal, safe PHP handler:

<?php
session_start();
if (empty($_SESSION['user_id'])) { http_response_code(403); exit; }
// verify the CSRF token here

$file = $_FILES['upload'] ?? null;
if (!$file || $file['error'] !== UPLOAD_ERR_OK || $file['size'] > 5 * 1024 * 1024) {
    http_response_code(400);
    echo json_encode(['error' => ['message' => 'Upload failed']]);
    exit;
}

$types = ['image/jpeg' => 'jpg', 'image/png' => 'png', 'image/webp' => 'webp', 'image/gif' => 'gif'];
$mime = (new finfo(FILEINFO_MIME_TYPE))->file($file['tmp_name']);
if (!isset($types[$mime])) {
    http_response_code(415);
    echo json_encode(['error' => ['message' => 'Only images are allowed']]);
    exit;
}

$name = bin2hex(random_bytes(16)) . '.' . $types[$mime];
move_uploaded_file($file['tmp_name'], __DIR__ . '/uploads/editor/' . $name);

header('Content-Type: application/json');
echo json_encode(['url' => '/uploads/editor/' . $name]);

The handler checks that the user is logged in, checks the real file type with finfo instead of trusting the extension, and saves the file under a random name, so nobody can upload shell.php and run it.

TinyMCE works the same way with its images_upload_url option.

CKEditor 4 is also past its end of life for the free version, so if you’re replacing FCKeditor, go straight to CKEditor 5 or TinyMCE.

Common questions

Why does the editor say the upload worked when it didn’t?

The old connector often returns an empty or broken response when PHP throws an error, and FCKeditor treats that as success. The PHP error log shows the real problem.

Is FCKeditor safe if I remove the file manager?

It’s safer, but the editor code is still unmaintained. Removing it completely is the only fix that won’t need revisiting.

Can I keep my existing content?

Yes. FCKeditor stored plain HTML, which CKEditor 5 and TinyMCE can load. Images already uploaded stay where they are.