Bluehost Web Hosting Help

Find and replace across multiple files

With SSH command line access, you can do the following to edit several individual pages to replace a string of text e.g. update the phone number on the footer of every page on your site.
              * perl -pi -w -e 's/search/replace/g;' *.php
                -e means execute the following line of code.
                -i means edit in-place
                -w write warnings
                -p loop
              * find ./ -type f -exec sed 's/search/replace' {} \;
            
Knowledgebase Article 160,491 views bookmark tags: command find replace ssh


Was this resource helpful?

Did this resolve your issue?


Please add any other comments or suggestions about this content:





Recommended Help Content

Backup and Restore with Site Backup Pro

How to restore individual files or folders with the Site Backup & Restore tool

How To Manage Databases With Command Line SSH

This article will instruct you how to export a database from the command line (SSH).

How To Edit Website Files With The File Manager - File Manager Guide

I am trying to edit my web page and I have no idea how to? I need to know how to go into the site and fix it. My webpage has a error in the first paragraph. I don't know how to fix it? Can you help?

Related Help Content

How to Manage your Google My Business Listing from your Control Panel

You can edit basic information like hours of operation, phone number, website URL, and the business category in just a few simple steps; however, changing your business name or location is a bit more complicated.

How Import Databases Using Command Line SSH

This article will instruct you how to import a database from the command line (SSH).

SSH Access

Is SSH/Shell access enabled by default?

Protect Specific Pages With SSL

This article will show a way to protect specific pages of your website with SSL. This may have benefits for SEO and can be used on pages that contain forms, shopping carts or any other page where users might enter sensitive information.

Pushing Website from old host to Bluehost.com

How to Transfer hosted files from old host to Bluehost.com via ssh. Your old host must have SSH access to perform this move. Using SSH to transfer files to Bluehost

What Are SSH Connections - How To Edit In PuTTY, Mac, & Linux

What is SSH and how do I setup secure connections.

PHP pages do not display

If suddenly when you go to your page, you get nothing on the page. You can still get HTML to display, just not PHP. To serve HTML pages to browsers, we don't associate the Apache processes with your 2

How to Manage your Maestro Profile

You can view and edit your own Maestro profile information from the Maestro dashboard. This article will show you where and how to do so, should you ever need to change anything.