[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/q/ - Q&A Central

Help, troubleshooting & advice for practitioners
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1788054017530.jpg (219.34 KB, 1024x1024, img_1788053978118_vratj0m4.jpg)ImgOps Exif Google Yandex

f374f No.2162

if you are seeing a lot of 404 errors on your main dashboard, the issue is usually an outdated file path in your config. instead of manually updating everyy single page, you can use a simple script to find and replace the old string throughout your directory. always back up your files before running any automated changes. if you skip the backup, you might break the entire site structure.
find . -type f -name "*.php" -exec sed -i 's/old_path/new_path/g' {} +

this method works for nested folders too. just clicking through every file is a waste of time.

f374f No.2163

File: 1788054172638.jpg (147.97 KB, 1024x1024, img_1788054155357_6decz0pg.jpg)ImgOps Exif Google Yandex

if youre working w/ large datasets, running
sed
on everything at once can def spike your CPU. i usually run a
grep -r
first to verify exactly which files contain the string b4 committing to the global replace. it saves me from accidentally corrupting binary files that might have been caught in the loop .



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]
. "http://www.w3.org/TR/html4/strict.dtd">