{"id":19952062,"url":"https://github.com/studio24/fix-staging-urls","last_synced_at":"2025-10-13T21:40:19.490Z","repository":{"id":22288522,"uuid":"25623169","full_name":"studio24/fix-staging-urls","owner":"studio24","description":"Script to help fix incorrect URL paths to staging websites in database stored content","archived":false,"fork":false,"pushed_at":"2019-07-04T07:46:26.000Z","size":25,"stargazers_count":5,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-30T23:56:06.647Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/studio24.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-23T06:36:56.000Z","updated_at":"2021-04-30T03:34:38.000Z","dependencies_parsed_at":"2022-08-21T01:00:16.059Z","dependency_job_id":null,"html_url":"https://github.com/studio24/fix-staging-urls","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/studio24/fix-staging-urls","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studio24%2Ffix-staging-urls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studio24%2Ffix-staging-urls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studio24%2Ffix-staging-urls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studio24%2Ffix-staging-urls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/studio24","download_url":"https://codeload.github.com/studio24/fix-staging-urls/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studio24%2Ffix-staging-urls/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017051,"owners_count":26085951,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T01:11:23.552Z","updated_at":"2025-10-13T21:40:19.468Z","avatar_url":"https://github.com/studio24.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fix absolute paths in database content\n\nScript to help fix incorrect absolute URL paths in database stored content. This often occurs where content is entered \non a test or staging URL and then you want to go live on a different URL. \n\nFor example database content with the following HTML: \n\n    \u003cimg src=\"http://staging.domain.com/assets/img/person.jpg\" alt=\"The team\"\u003e\n\nWill be translated to: \n\n    \u003cimg src=\"/assets/img/person.jpg\" alt=\"The team\"\u003e\n\nThis will update string data stored in a database as well as serialized data (arrays only).\n\nIf you find any issues with this script please create a pull request!\n\n## Usage\n\nSimple usage:\n\n    php fixUrls.php staging.domain.com\n\nSpecify which database table/s to replace content in (you can add any number of tables at the end of the argument list, \nseparated by spaces):\n\n    php fixUrls.php staging.domain.com exp_channel_data\n\nYou can pass database parameters:\n\n    php fixUrls.php staging.domain.com --host=localhost --username=user --password=abc123 --database=my_database \n\nYou can also replace the base path for all links:\n\n    php fixUrls.php staging.domain.com --basePathRemove=/sites/default/files/ --basePathReplace=/files/\n\nFor example, links such as:\n\n    \u003cimg src=\"http://staging.domain.com/sites/default/files/person.jpg\" alt=\"The team\"\u003e\n\nWill be translated to: \n\n    \u003cimg src=\"/files/person.jpg\" alt=\"The team\"\u003e\n\nOutput help documentation:\n\n    php fixUrls.php --help\n\n## Installation\n\nThis CLI scripts uses the [Symfony Console](http://symfony.com/doc/current/components/console/index.html) component. \nUse [Composer](http://getcomposer.org) to load this.\n\nTo install run the following commands:\n\n```\nwget https://github.com/studio24/fix-staging-urls/archive/v1.1.tar.gz -O - | tar -xz\ncd fix-staging-urls-1.1\ncomposer install\n```\n\nOr if you want to check out the Git repo:\n\n```\ngit clone https://github.com/studio24/fix-staging-urls\ncd fix-staging-urls\ncomposer install\n```\n\n## License\n\nMIT License (MIT)\nCopyright (c) 2014-2019 Studio 24 Ltd (www.studio24.net)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstudio24%2Ffix-staging-urls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstudio24%2Ffix-staging-urls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstudio24%2Ffix-staging-urls/lists"}