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 395 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 Online
    jamesJ Online
    james
    Staff
    wrote on 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 on 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 Online
        jamesJ Online
        james
        Staff
        wrote on 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 on 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 on 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 on 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 on 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 on 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 on 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 on
                    • jamesJ james has marked this topic as solved on
                    • P Offline
                      P Offline
                      p44
                      translator
                      wrote on last edited by
                      #11

                      @sebastienserre @james ๐Ÿ‘๐Ÿ‘๐Ÿ‘

                      1 Reply Last reply
                      1

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better ๐Ÿ’—

                      Register Login
                      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