Giter Site home page Giter Site logo

pegasusict / plat_wordpresstools Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 21 KB

This toolset is aimed at making it easier to install & maintain WordPress websites, both on public hosting as well as local development servers. This is a sub project of PLAT.

License: MIT License

Shell 100.00%

plat_wordpresstools's People

Contributors

pegasusict avatar

Watchers

 avatar  avatar  avatar

Forkers

codacy-badger

plat_wordpresstools's Issues

WordPress Migration Script

luckily, our hosting provider has ssh access, so automating the moving of a WP-powered website is feasible.

Procedure:

  • Copy all files from the old to the new (sub)domain etc
  • Update DB:

UPDATE wp_options SET option_value = 'http://NEW_URL' WHERE wp_options.option_name = 'siteurl';
UPDATE wp_options SET option_value = 'http://NEW_URL' WHERE wp_options.option_name = 'home';


new code to check:

UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl');
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');


check other records in database for vhost uri's

  • Export DB and import on the new DB-server if necessary
  • new database host/user/DB/pass in wp-config.php of the new site.
  • As soon as the DNS for the new site is working, rename dir of old hosting to *.bak or delete and create new dir with same name
  • to incorporate for out of date google results, old bookmarks etc, create index.php with the following code:

header("Location: http://NEW_URL/", true, 301);
exit;

WP installation functionality

I'm constructing a script to install WP on a site and perform all the basic setup, DB config, etc

planned functionality:

  • single/multiple sites at once?
  • select location: local/remote
  • webserver type: apache/nginx/caddy
  • remote access: ftp/ssh
  • generate certificates & auto update certs
  • setup DB & DBuser(s)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.