• Resolved jesslohm

    (@jesslohm)


    I’m freaking out! Worst-case scenario!

    I added a folder ‘relaunch’ in FTP to work on my new website and installed WP in that folder, added a new DB for this folder.

    https://jessicavoiceover.com

    I replaced all files/folders to relaunch it today.
    I erased ‘/relaunch’ in the database fields in wp_options.

    I made the mistake of erasing the folder ‘relaunch’ in my ftp program because I had a backup on my computer, BUT I just now realized that the backup is missing stuff, such as images under wp-content/uploads… SO, if images are missing, I’m afraid more important stuff is also missing…

    My provider told me he can’t help me & won’t even try!

    I’m using the Divi theme and in the admin area, all pages and posts are EMPTY!!! There is no page builder with content, everything is GONE!!!

    SO, question is, I have a database backup from Monday, an .sql.gz file, but I have no idea what to do with that.

    I am grateful for anyone who can help me out!

Viewing 15 replies - 1 through 15 (of 38 total)
  • I erased ‘/relaunch’ in the database fields in wp_otions.

    It’s still not working.

    Is there anything else I need to do?

    cPanel > phpMyAdmin SQL

    note: Edit ‘pref’ (the table prefix in three places below) to your own value (as in $table_prefix = '???_'; in wp-config.php), and then change ‘https://www.olddomain.com’ and ‘https://www.newdomain.com’ as required (three places each and with no trailing slashes)

    UPDATE pref_options SET option_value = replace(option_value, 'https://www.olddomain.com', 'https://www.newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
    UPDATE pref_posts SET guid = replace(guid, 'https://www.olddomain.com', 'https://www.newdomain.com');
    UPDATE pref_posts SET post_content = replace(post_content, 'https://www.olddomain.com', 'https://www.newdomain.com');
    Thread Starter jesslohm

    (@jesslohm)

    It’s the same domain: it was jessicavoiceover.com and I just worked in jessicavoiceover.com/relaunch… I switched out the files, but unfortunately, I switched out the backup version which may not have been complete…

    I edited my post above… Maybe you can help me with the databank!

    I might or might not be understanding you completely, so please allow me to try to be certain here:

    You worked in jessicavoiceover.com/relaunch, then moved things and you now want that database to work for jessicavoiceover.com, correct?

    If so, you need to change more than just the two URL entries in prefix_options…and that is what the above code can do. Put your table prefix in place of ‘pref’ in that code (three places), then put your complete old and new URLs in their three places each without adding any trailing slashes, then go to cPanel > phpMyAdmin and run that SQL code on your database. Changing the URLs at Dashboard > Settings > General *prior to* moving things would have done that, but now you need to do it manually.

    edit: Always, always make an SQL backup of your database before making any changes!

    Thread Starter jesslohm

    (@jesslohm)

    “You worked in jessicavoiceover.com/relaunch, then moved things and you now want that database to work for jessicavoiceover.com, correct?”

    Correct.

    oh dear, I, unfortunately, have no idea what you want me to do…. I’m not a developer, I’m sorry and I know it’s annoying for you guys to have to speak to non-developers, but maybe you can simplify this for me so that I know exactly what to write where… That would be amazingly kind of you!

    1) Put your table prefix in place of ‘pref’ in that code (three places) – How do I do that & what exactly do I do?

    2) then put your complete old and new URLs in their three places each without adding any trailing slashes – again, what? Do I type exactly this somewhere?

    UPDATE pref_options SET option_value = replace(option_value, ‘https://www.jessicavoiceover.com’, ‘https://www.jessicavoiceover.com/relaunch’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;

    UPDATE pref_posts SET guid = replace(guid, ‘https://www.jessicavoiceover.com’, ‘https://www.jessicavoiceover.com/relaunch’);

    UPDATE pref_posts SET post_content = replace(post_content, ‘https://www.jessicavoiceover.com’, ‘https://www.jessicavoiceover.com/relaunch’);

    I opened wp-config.php and found this:

    /**
    * WordPress Database Table prefix.
    *
    * You can have multiple installations in one database if you give each a unique
    * prefix. Only numbers, letters, and underscores please!
    */
    $table_prefix = ‘wp_’;

    OK, what exactly do I do here?

    Remember: the relaunch folder no longer exists, so I’m really confused …

    3) then go to cPanel > phpMyAdmin and run that SQL code on your database.
    I can get into my phpMyAdmin – but have NO idea how to run a SQL code? What code? Where? Huh? I’m so sorry… I found this “Run SQL query/queries on server “localhost”:” – is that it? What do I type in there?

    4) Changing the URLs at Dashboard > Settings > General *prior to* moving things would have done that, but now you need to do it manually. Both the WordPress & Site Address is https://jessicavoiceover.com – so I don’t have to do anything with that…

    Thread Starter jesslohm

    (@jesslohm)

    I just looked again in Firefox and your site still attempts to load but then the page goes white.

    I found this “Run SQL query/queries on server “localhost”:” – is that it? What do I type in there?

    That looks to me like you are close, just be sure you have selected your database at the top of phpMyAdmin so you have something like localhost >> yourdatabasename showing, then click the SQL tab and paste this code into the box and then click “Go”:

    UPDATE wp_options SET option_value = replace(option_value, 'https://www.jessicavoiceover.com/relaunch', 'https://www.jessicavoiceover.com') WHERE option_name = 'home' OR option_name = 'siteurl';
    UPDATE wp_posts SET guid = replace(guid, 'https://www.jessicavoiceover.com/relaunch', 'https://www.jessicavoiceover.com');
    UPDATE wp_posts SET post_content = replace(post_content, 'https://www.jessicavoiceover.com/relaunch', 'https://www.jessicavoiceover.com');

    Both the WordPress & Site Address is https://jessicavoiceover.com – so I don’t have to do anything with that…

    You can remove that first line of code, if you wish, but it is fine there and will not change anything you had done.

    Thread Starter jesslohm

    (@jesslohm)

    It said:

    MySQL said: Documentation

    #1046 – No database selected

    ALTHOUGH in the tab right next to it, the correct database was showing… Too bad I can’t upload screenshots here…

    Thread Starter jesslohm

    (@jesslohm)

    In the wp_icl_string_positions – ALL links have /relaunch in them. Is that the problem? Is there a way to get rid of them automatically? I’ve started to change them manually, but there are over 800 of them…

    Maybe ask your host about helping you with that code. Manual edits are seldom a good idea and can even break things.

    I hope you made a backup!

    Thread Starter jesslohm

    (@jesslohm)

    They are of NO help, I called 3x already… They don’t know WP and can’t help me at all…

    yes, I made a backup of the DB, but only after I moved it… I made weekly backups of the DB for years & I thought the backups involved the relaunch DB as well, but found out today it didn’t…

    I just don’t understand. I didn’t DO anything to the DB, all I did was move everything under /relaunch into the root directory and erase the subfolder /relaunch in a few places in the DB… What is going on?

    Thread Starter jesslohm

    (@jesslohm)

    So are you telling me no one can help me? I have now lost everything?

    No, it can be fixed, we just need to take things one-step-at-a-time and be very methodical about it.

    Both the WordPress & Site Address is https://jessicavoiceover.com – so I don’t have to do anything with that…

    Do you recall how you did that? If you did that at phpMyAdmin, you simply need to go back to that same database, select that database without also selecting the wp_options table or any other table and then click the SQL tab and run that code.

    Thread Starter jesslohm

    (@jesslohm)

    Sorry, had to go to bed…

    I erased /relaunch in phpMyAdmin directly and tried to run that code exactly like you requested which is what I did yesterday too, but I keep getting this error msg:

    https://www.jessicavoiceover.com/img/db.png

    Thread Starter jesslohm

    (@jesslohm)

    I see under wp_posts that ALL URL’s have /relaunch in them which is what that code was supposed to fix I assume, is that correct? It’s just not working… ??

    Ah, you are very close! In your screenshot, you have only selected “Databases” so far and need to select the actual, single database at the tail of your arrow before running the code.

Viewing 15 replies - 1 through 15 (of 38 total)
  • The topic ‘Relaunch is not working, Need help with Database’ is closed to new replies.