Download the PHP package guigaba/search-replace-db without Composer

On this page you can find all versions of the php package guigaba/search-replace-db. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package search-replace-db

Search Replace DB

This script was made to aid the process of migrating PHP and MySQL based websites. It has additional features for WordPress and Drupal but works for most other similar CMSes.

If you find a problem let us know in the issues area and if you can improve the code then please fork the repository and send us a pull request :)

Warnings & Limitations

  1. Three character UTF8 seems to break in certain cases.
  2. We can't test every possible case, though we do our best. Backups and verifications are important.
  3. The license for this script is GPL v3 and no longer WTFPL. Please bear this in mind if contributing or branching.
  4. You use this script at your own risk and we have no responsibility for any problems it may cause.
  5. Do backups.

Usage

  1. Do backups.
  2. Migrate all your website files.
  3. Upload the script folder to your web root or higher.
  4. Browse to the script folder URL in your web browser.
  5. Fill in the fields as needed.
  6. Choose the Dry run button to do a dry run without searching/replacing.

Installation

If you would like Search Replace DB to detect your WordPress installation, you should install it within a new subfolder within your WordPress installation.

For example, if you have

/website.com/index.php

/website.com/wp-config.php

/website.com/wordpress/

/website.com/wordpress/index.php

/website.com/wordpress/wp-settings.php

etc.

You can copy Search Replace DB into the following location:

/website.com/wordpress/Search-Replace-DB/

/website.com/wordpress/Search-Replace-DB/index.php

/website.com/wordpress/Search-Replace-DB/srdb.class.php

/website.com/wordpress/Search-Replace-DB/srdb.cli.php

etc.

CLI script

To invoke the script, nagivate in your shell to the directory to where you installed Search Replace DB.

Type php srdb.cli.php to run the program. Type php srdb.cli.php --help for usage information:

-h, --host

    Required. The hostname of the database server.

-n, --name

    Required. Database name.

-u, --user

    Required. Database user.

-p, --pass

    Required. Database user's password.

--port

    Optional. Port on database server to connect to.
    The default is 3306. (MySQL default port).

-s, --search

    String to search for or `preg_replace()` style regular
    expression.

-r, --replace

    None empty string to replace search with or
    `preg_replace()` style replacement.

-t, --tables

    If set only runs the script on the specified table, comma
    separate for multiple values.

-i, --include-cols

    If set only runs the script on the specified columns, comma
    separate for multiple values.

-x, --exclude-cols

    If set excludes the specified columns, comma separate for
    multiple values.

-g, --regex [no value]

    Treats value for -s or --search as a regular expression and
    -r or --replace as a regular expression replacement.

-l, --pagesize

    How many rows to fetch at a time from a table.

-z, --dry-run [no value]

    Prevents any updates happening so you can preview the number
    of changes to be made

-e, --alter-engine

    Changes the database table to the specified database engine
    eg. InnoDB or MyISAM. If specified search/replace arguments
    are ignored. They will not be run simultaneously.

-a, --alter-collation

    Changes the database table to the specified collation
    eg. utf8_unicode_ci. If specified search/replace arguments
    are ignored. They will not be run simultaneously.

-v, --verbose [true|false]

    Defaults to true, can be set to false to run script silently.

--help

    Displays this help message ;)

Troubleshooting

I get a popup saying there was an AJAX error

This happens occasionally and could be for a couple of reasons:


All versions of search-replace-db with dependencies

PHP Build Version
Package Version
Requires php Version >=7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package guigaba/search-replace-db contains the following files

Loading the files please wait ....