Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. WordPress (Developer)
  3. wp db import : file missing or not readable

wp db import : file missing or not readable

Scheduled Pinned Locked Moved Solved WordPress (Developer)
11 Posts 4 Posters 20 Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • jamesJ Offline
    jamesJ Offline
    james
    Staff
    wrote last edited by
    #2

    Hello @sebastienserre
    Have you tried using the full path to the file?

    wp db import /app/data/public/backup.sql
    
    1 Reply Last reply
    2
    • P Offline
      P Offline
      p44
      translator
      wrote last edited by p44
      #3

      I don’t know your use case, but please try to follow these steps, from Cloudron instance command line.

      Note that the old DB will be totally deleted.

      Before, upload mysqldump.sql to TMP folder

      Then, open MySQL command line and type:

      STATUS; //to know database name
      DROP DATABASE cfda74f223139c8; //delete old DB
      CREATE DATABASE cfda74f223139c8; //create a new DB
      USE cfda74f223139c8; //use new created DB
      SOURCE mysqldump.sql; //import DB
      

      cfda74f223139c8 is only for demo purpose, instead, you’ve to put your DB Name that comes from STATUS command.

      Check if DB is imported:

      show tables;
      

      Let us know if everything works good.

      1 Reply Last reply
      0
      • jamesJ Offline
        jamesJ Offline
        james
        Staff
        wrote last edited by
        #4

        Hello @p44
        This is one way.
        It is also documented https://docs.cloudron.io/guides/import-mysql

        But I know that @sebastienserre knows about this documentation from his latest @dolibarr migration.
        So I guess his question is specific to the wp-cli.

        P 1 Reply Last reply
        2
        • jamesJ james

          Hello @p44
          This is one way.
          It is also documented https://docs.cloudron.io/guides/import-mysql

          But I know that @sebastienserre knows about this documentation from his latest @dolibarr migration.
          So I guess his question is specific to the wp-cli.

          P Offline
          P Offline
          p44
          translator
          wrote last edited by p44
          #5

          @james Method I suggested is "half way" between wp-cli and Cloudron. 😉

          «All roads lead to Rome»

          Let’s see if works also for @sebastienserre scenario

          1 Reply Last reply
          1
          • sebastienserreS Offline
            sebastienserreS Offline
            sebastienserre
            wrote last edited by sebastienserre
            #6

            Yes, my question was, why this specific import method from WPCLi (which is easier than a SQL query) doesn't work.
            I do not know if I'm doing something wrong or if it's a limitation of the WordPress developer Cloudron app.

            but thank you for your tip @p44

            He/Him - Native language: French

            1 Reply Last reply
            1
            • sebastienserreS Offline
              sebastienserreS Offline
              sebastienserre
              wrote last edited by
              #7

              @p44 tip works but it's really easier to launch a wp db import backup.sql command.

              He/Him - Native language: French

              1 Reply Last reply
              2
              • P Offline
                P Offline
                p44
                translator
                wrote last edited by
                #8

                @sebastienserre Thanks for your feedback: I’m glad that method works.

                About your original question, did you try to upload file in TMP folder and then, from command line, point to that file?

                jdaviescoatesJ 1 Reply Last reply
                1
                • P p44

                  @sebastienserre Thanks for your feedback: I’m glad that method works.

                  About your original question, did you try to upload file in TMP folder and then, from command line, point to that file?

                  jdaviescoatesJ Offline
                  jdaviescoatesJ Offline
                  jdaviescoates
                  wrote last edited by
                  #9

                  @p44 said in wp db import : file missing or not readable:

                  did you try to upload file in TMP folder and then, from command line, point to that file?

                  or just the full path as suggested by @james ?

                  I use Cloudron with Gandi & Hetzner

                  1 Reply Last reply
                  0
                  • sebastienserreS Offline
                    sebastienserreS Offline
                    sebastienserre
                    wrote last edited by
                    #10

                    oh! I'm sorry, i missed @james answer. wp db command works with the full path

                    He/Him - Native language: French

                    1 Reply Last reply
                    3
                    • jamesJ james marked this topic as a question
                    • jamesJ james has marked this topic as solved
                    • P Offline
                      P Offline
                      p44
                      translator
                      wrote last edited by
                      #11

                      @sebastienserre @james 👏👏👏

                      1 Reply Last reply
                      1
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Bookmarks
                      • Search