Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

If WordPress stopped uploading media or installing updates after you moved a virtual-host directory, fix two separate layers: make sure the active Apache or Nginx virtual host and PHP handler use the new document root, then give the account that runs PHP only the read, traverse and narrowly scoped write access WordPress needs. A directory move alone does not update server configuration or make Unix permissions correct.

Start with the failure you can prove

Do not begin by recursively changing ownership or running chmod 777. A moved site can appear to have a permissions problem while the server is still serving the old directory, using a different PHP-FPM pool, or mapping scripts to a stale path. Establish which path and process are actually active before changing files.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • The public site loads, but media uploads fail.
  • Plugin or theme installation reports that WordPress cannot create a directory or copy files.
  • Updates work from one interface but fail from another.
  • The front end shows the new files while /wp-admin or PHP errors refer to the old location.
  • Permissions look correct on the moved files, but a parent directory blocks traversal.

These symptoms can have different causes. Treat the migration as a configuration check followed by a permission check, not as a single recursive chown operation.

Back up the site before repairing it

Create a restorable copy before changing ownership, modes, ACLs, security contexts or configuration. The backup should include the WordPress directory, uploaded images and other content, plugins, themes, custom files and the database. Keep at least one copy outside the server or on storage that is not affected by the same account permissions.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.

Record the current state as well. Save the active virtual-host configuration, PHP-FPM pool settings, the output of ownership and mode checks, and a copy of wp-config.php with secrets protected. This gives you a way to identify what changed if a repair makes the site less accessible.

Confirm that the active vhost points to the moved directory

Check the configuration that is actually loaded by the running web server, not only a file you edited during the move. On Apache, verify the active DocumentRoot and any directory blocks. On Nginx, verify the active server block’s root, the PHP location block and its FastCGI path mapping. The PHP handler must resolve the requested script in the new tree.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Identify the hostname and port used by the failing request.
  2. Find the enabled Apache virtual host or Nginx server block for that hostname.
  3. Check that its document-root path is the new absolute path, with no typo, symlink surprise or trailing-directory mismatch.
  4. Check the PHP-FPM socket or service selected by that host.
  5. Inspect SCRIPT_FILENAME (or the equivalent path mapping) and confirm it combines the new root with the requested script name.
  6. Reload or restart only after validating syntax, then make one controlled request and inspect the error log.

A stale root can produce a misleading “permission denied” message because the server may be reading a directory that you did not repair. A successful front-end response also does not prove that the administrative requests use the same root or PHP pool.

Find the account that really runs PHP

Never assume the account is www-data. Depending on the operating system and hosting design, PHP may run as an Apache account, a per-site PHP-FPM user, an isolated system user, or a container user. The correct owner and group therefore depend on the execution model.

Use the service and pool configuration, the process list and the host’s documentation to identify the effective user and group. A temporary diagnostic script can reveal the effective PHP identity, but remove it immediately after testing and do not expose it publicly. On managed hosting, ask the provider which account is supported for WordPress writes before changing ownership or server configuration.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Separate two roles wherever practical:

  • A site-maintainer or deployment account owns the code and can update it through SFTP, SSH or a documented deployment process.
  • The PHP/web-server account can read and traverse the code and can write only to paths WordPress must modify, normally parts of wp-content.

Giving the web process ownership of the entire application makes a compromised plugin or PHP process more powerful and can prevent administrators from managing files with their normal account.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Inspect every directory in the path

Unix permission checks apply to every component of an absolute path. The moved WordPress directory may be readable while a parent such as /srv, /srv/www or a release directory denies execute (traverse) access. For a directory, the execute bit allows a user or group to enter it and access names inside; it is not the same as file execution.

Inspect the full path, the document root, wp-content, the uploads directory and any custom content directories. Check:

  • Owner and group on each path component.
  • Read, write and execute bits for owner, group and other.
  • Access-control lists that add or remove permissions beyond the mode bits.
  • Symlink targets, if the document root or uploads directory is a symlink.
  • Security controls such as SELinux or AppArmor, where enabled.
  • Disk space, inode availability and read-only mounts, which can look like write failures.

Commands such as namei -l /srv/www/example, stat /srv/www/example/wp-content and getfacl (when ACLs are in use) help show the effective path state. Run them with an account that can inspect the directories, and substitute your real path rather than copying a distribution-specific example unchanged.

Choose an ownership model before changing modes

The right repair depends on who deploys files and who executes PHP. Use this decision table as a starting point, then follow the host’s documented model.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
Execution model Code owner PHP/web-server access Typical write design Main caution
Single system user The same site account that runs PHP Owner read/write/traverse WordPress can write required content paths Keep the account isolated from unrelated sites
Per-site PHP-FPM pool Administrator or deployment account Pool user reads and traverses through group or ACL access Grant that user write access only to required content directories Do not replace the pool identity with a generic web account
Shared hosting Provider-defined account Provider’s PHP account and isolation rules Use the provider’s file manager, repair tool or documented ownership Unsupported recursive changes can lock you out
Containerized deployment Image or deployment user Container runtime user Persistent volume permissions or ACLs match the container UID/GID Host usernames may not match container numeric IDs

Ownership commands copied from another distribution can make either the web process or the administrator unable to work. Identify the actual numeric user and group when containers or isolated pools are involved.

Apply a least-privilege baseline

WordPress hardening guidance commonly uses mode 755 for directories and 644 for regular files as a baseline. These values let the owner write while allowing the service account to read and traverse when ownership or group membership is arranged accordingly. They are not a universal answer: the required group, ACL and writable paths vary by host.

After confirming the root, account and backup, a maintainer might use commands like these, replacing every example path and account with verified values:

sudo find /srv/www/example -type d -exec chmod 755 {} ;
sudo find /srv/www/example -type f -exec chmod 644 {} ;

Do not run a blanket command over mounted storage, a shared parent directory or files that intentionally require special modes. Review set-user-ID files, sockets, private keys and deployment secrets separately. A configuration file containing database credentials should not become broadly readable merely because a generic file command was used.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If the PHP account cannot read the tree after the baseline, correct ownership, group membership or an ACL rather than making every file world-writable. For example, a deployment group can own the code while the PHP pool user is a member of that group, or an ACL can grant the pool user read and traverse access without changing the primary owner. Document whichever model you choose so the next deployment does not undo it.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

Grant write access only where WordPress needs it

Most sites need WordPress to write uploads and possibly other generated content under wp-content. The exact set depends on installed plugins, caching systems and deployment policy. Keep plugin, theme and core code read-only to the web process when updates are performed by an administrator or deployment pipeline.

  1. Start with the uploads directory, commonly wp-content/uploads, and verify that its parent directories are traversable.
  2. Attempt one small upload rather than granting write access to the entire tree.
  3. If a trusted update workflow requires WordPress to install plugins or themes, grant write access to the narrow directories that workflow uses, then test and document it.
  4. Remove write access from paths that do not need it.

A group-writable design can be appropriate when the site-maintainer and PHP account share a dedicated group. Use a restrictive group mode such as 775 for directories or 664 for files only when the group is isolated to the site and the host’s model requires it. Do not use these modes as a reflex on shared systems.

Never use 777 as a permanent fix. It allows any local user and the web process to modify the path, increasing the damage a compromised process can cause. If it appears to “fix” an upload, that result proves only that the previous access path was too restrictive; replace it with ownership, group or ACL permissions that grant the minimum required access.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Handle Apache and Nginx differences correctly

Apache

Apache installations may use .htaccess for WordPress permalink rules. If the workflow allows WordPress to update rewrite rules, Apache must be able to write that file, and the directory must permit the change. Grant write access to .htaccess only when the site’s Apache configuration and operational policy require it. Otherwise, keep it administrator-managed and place rewrite rules in the virtual-host configuration.

Nginx

Nginx does not process .htaccess. A missing or unwritable .htaccess file will not repair Nginx permalinks. Check the Nginx server block, the try_files rule and the PHP-FPM path mapping instead. Keep rewrite configuration in Nginx and give WordPress no additional write permission merely because an Apache guide mentioned .htaccess.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Check WordPress-specific mode settings

WordPress can influence modes assigned to newly created directories and files through FS_CHMOD_DIR and FS_CHMOD_FILE in wp-config.php. If old files work but new uploads or plugin files repeatedly receive unexpected modes, inspect these constants and any deployment code that changes them.

Change them only with a clear reason and a backup. The constants cannot compensate for a missing parent-directory traverse permission, an incorrect PHP user, an ACL denial or a security policy block. They affect modes applied by WordPress; they do not change the server’s active document root.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Account for ACLs and mandatory security controls

Mode bits are only one layer. An ACL can deny or grant access that is not obvious from a short ls -l listing. Inspect ACL entries when the owner, group and modes look correct but PHP still receives “permission denied.” Remove stale migration ACLs or replace them with a documented site-specific entry rather than adding broad access.

SELinux, AppArmor and hosting isolation can also block a write after Unix permissions pass. The relevant audit or error log usually identifies the policy denial. Use the distribution’s supported labeling or profile procedure, and involve the hosting provider when policy changes are managed centrally. Do not disable a security module as a shortcut.

Finish the migration safely

After the filesystem and server configuration are corrected, verify the application-level migration details:

  1. Load the public site and several representative pages.
  2. Sign in to /wp-admin and confirm that the dashboard loads without PHP path errors.
  3. Upload one test image and verify that WordPress creates the expected year/month subdirectory and that the image is retrievable.
  4. Perform a controlled plugin or theme update only if that operation is part of the site’s normal workflow.
  5. Review PHP-FPM, Apache or Nginx logs for the exact request time; remove any temporary diagnostic scripts.
  6. Check WordPress and site URLs, especially when the hostname or directory changed.
  7. Remove temporary migration settings. In particular, do not leave the RELOCATE constant in wp-config.php; WordPress documents leaving it enabled as insecure.
  8. Keep the backup until the site has completed a normal request and backup cycle from its new location.

Troubleshoot by symptom

Symptom Likely layer What to check next
Front end and admin both show the old site Virtual-host or DNS selection Confirm the hostname reaches the intended server block and that its root is the moved path.
Front end loads, but uploads fail PHP identity or writable content path Identify the PHP user, inspect every parent directory and test wp-content/uploads specifically.
Files are readable, but PHP reports permission denied Traverse bit, ACL or security policy Use a full-path inspection, review ACLs and check SELinux/AppArmor audit logs.
Plugin updates fail while SFTP updates work Web-process write policy Decide whether web-based updates are intended; grant narrow write access or use the documented deployment process.
Permalinks fail only on Nginx Server-block rewrite or FastCGI mapping Check Nginx routing and PHP script mapping; do not try to fix it by writing .htaccess.
Permissions revert after deployment Release process or synchronization tool Inspect deployment ownership, umask, ACL inheritance and container volume settings.
Everything looks correct but writes still fail Disk, mount or host restriction Check free space, read-only mounts, quotas and provider-level isolation before changing modes again.

When to stop and ask the host

Use provider documentation or support when you cannot identify the PHP account, the server configuration is managed outside your access, the site uses shared hosting isolation, or a security policy blocks the required path. Managed environments often provide a supported ownership repair or migration procedure; an improvised recursive command can violate that model and make both the site and control panel inaccessible.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a self-managed server, record the final owner, group, modes, ACLs, PHP pool identity and writable directories. That inventory turns the next move into a repeatable change rather than another permissions guess.

A compact repair checklist

  • Back up the files, uploads, plugins, other custom files and database.
  • Verify the active Apache DocumentRoot or Nginx root.
  • Verify the PHP-FPM pool, socket and script path mapping.
  • Identify the actual PHP/web-server user and group.
  • Inspect every parent directory, symlink target, ACL and security control.
  • Use a documented ownership model that keeps code administration separate from web writes when possible.
  • Apply a typical 755 directory and 644 file baseline only after checking exceptions.
  • Grant write access narrowly to uploads and other paths that truly require it.
  • Do not use chmod 777 as a repair.
  • Handle .htaccess only for Apache workflows that need it.
  • Review FS_CHMOD_DIR and FS_CHMOD_FILE when new files receive unexpected modes.
  • Test the front end, admin, one upload and a controlled update.
  • Remove temporary migration settings, including RELOCATE, and retain the backup until normal operation is confirmed.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.