• Resolved vallor

    (@vallor)


    Hello everyone, I need help!

    First of all, I am pretty new to WordPress but not as new to web development and Linux. I got myself new website its previous owner sent me 2 databases dumps (for website & forum) and also big archive of all site’s files.

    I set up VPS server, installed Ubuntu 16.04, then Apache2+Mysql+PhP, then I created 2 databases and opened dumps in those. I made a folder in /var/www/sitename/ and transferred all files there and fixed wp-config.php

    After that I set up my new domain in apache2 and thought everything should work… It didn’t. Instead I’ve got a few errors in /var/log/apache2 which I followed and fixed to the best of my abilities. Then I stopped getting any errors in /var/logs but site didn’t work.
    I assumed my problem was with https (ssl certificate), so I made one for my new domain, I also changed ALL mentions of old website address inside every file… But it didn’t help.

    Right now I have no idea what else to even try…

    • This topic was modified 6 years, 4 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 22 total)
  • Hi @vallor,

    What error message are you getting? This could be a DNS issue.

    Your site redirects to https://affenknecht.com/

    In my experience, this happens in 2 scenarios.

    1. when you’re trying to visit the secured version of a site with no security certificate, it basically redirects to the primary domain name of the hosting account or another site on the server with a security certificate.

    2. DNS issue. I have experienced this on a VPS account. In my case, the domain name DNS wasn’t resolving properly. I had to contact the hosting company to look into it.

    Thread Starter vallor

    (@vallor)

    Hello @sukafia
    Yeah, this is a correct domain name, that I am changing to, right now I finally made it work, the problem was with https or ssl certificate to be precise.

    But now I have a different issues first of all my mysql database has some real issues, it crushes sometimes when i use plugins and I get errors like this:
    enwp_postmeta’ is marked as crashed and should be repaired
    enwp_options’ is marked as crashed and should be repaired

    And I actually need to stop mysql to fix those tables.

    But that isn’t all my problems, now my forum isn’t working either I get this error with it:
    PHP Notice: Undefined offset: 1 in /forum/includes/vb5/frontend/routing.php on line 136

    which corresponds to this lines:

    134		if (isset($route['errors']))
    135		{
    136			$message = $route['errors'][0][1];
    137
    138			if ($message != 'no_vb5_database')
    139			{
    140				/* Some other exception happened */
    141				throw new vB5_Exception($message);
    142			}
    143		}
    • This reply was modified 6 years, 4 months ago by vallor.
    Thread Starter vallor

    (@vallor)

    @sukafia
    I also encountered new and really BIG problem, for some reason few of my database tables get constantle “crashed” like this:
    [ERROR] /usr/sbin/mysqld: Table ‘/enwp_options’ is marked as crashed and should be repaired”
    [ERROR] /usr/sbin/mysqld: Table ‘/enwp_postmeta’ is marked as crashed and should be repaired”

    It clogs up my RAM & CPU, which basically force me to reboot my VPS server… I tried repairing them using ‘repair table’ & myisamchk, it helps for a little while and then it happens again.

    It’s good to know you resolved the initial challenge, sorry about the new issues.

    About the database, check out this FAQ on troubleshooting database.

    Regarding your forum, it looks like there’s an error with the code. Enable WP debug mode in your wp-config file, it should help you pinpoint the problem. Remember to turn it off when you’re.

    The issue with your database is really weird, what plugins are active on your site? you should try disabling your plugins temporarily to investigate the issue.

    You should also check your logs for errors (including your server access logs).

    Thread Starter vallor

    (@vallor)

    @sukafia
    I fixed my forum at last, the last problem left is that some of my database tables get crashed and they crash the whole website, and I have no idea why it keeps hapepning over and over again.

    [ERROR] Got error 127 when reading table ‘./enwp_options’
    /enwp_options’ is marked as crashed and last (automatic?) repair failed

    I repaired this table at least 10 times in the last 4 days, it works fine for a few hours and BAM gets crashed again, or it can happen to others tables too… And I have no idea whats causing it or how to even begin looking for it.

    Please help me to at least pinpont the problem here.

    Hi,

    I asked some questions and provided a guide that should help earlier

    The issue with your database is really weird, what plugins are active on your site? you should try disabling your plugins temporarily to investigate the issue.

    You should also check your logs for errors (including your server access logs).

    You can try adding define(‘WP_ALLOW_REPAIR’, true); to your wp-config file. It helps to repair the database automatically. You may also want to try switching to any of the default twenty* themes.

    Let me know how it goes.

    You can also use the WordPress debug feature to debug your site by adding this snippet to your wp-config.

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );

    The debug log will help you log the errors on your site. Remember to check your server logs as I had suggested earlier. See this guide for help debugging in WordPress

    Also, you should check your browser console for errors.

    Thread Starter vallor

    (@vallor)

    @sukafia
    Thank you so much for trying to help me, I deactivated most of plugins already and it still keeps happening, right now I have only 13 active:
    Akismet Anti-Spam v4.1.3
    Contact Form 7 v5.1.6
    Contact Form 7 Captcha v0.0.3
    Contact Form 7 Multilingual v1.0.1
    Flamingo v.2.1
    tagDiv Cloud Library v1.3
    tagDiv Composer v2.4
    tagDiv Social Counter v4.6
    WP Limit Login Attempts v2.6.3
    WPML Multilingual CMS v4.3.6
    WPML String Translation v3.0.6
    Yoast SEO v12.8
    Yoast SEO Multilingual v1.0.3

    I turned on Debugging as you suggested too, where WP puts its log files tho?

    Thread Starter vallor

    (@vallor)

    I also discovered another issue that may cause this problem with database, I don’t have enough memory, and maybe it crashes when memory rans out, I created swapfile for 2gb because 2GB RAM wasn’t enough, now I see that even 2gb RAM + 2gb Swap isn’t enough…
    Thats most likely an error or bug of some kind, this site can not eat so much memory.

    Thread Starter vallor

    (@vallor)

    Ok, now this is interesting, with debugging on, I see insane amount of errors like this

    [17-Jan-2020 16:58:27 UTC] PHP Warning:  mysqli_real_connect(): (HY000/2002): No such file or directory in /var/www/html/wp-includes/wp-db.php on line 1633
    [17-Jan-2020 16:58:27 UTC] PHP Warning:  mysqli_real_connect(): (HY000/2002): No such file or directory in /var/www/html/wp-includes/wp-db.php on line 1633
    [17-Jan-2020 16:58:27 UTC] PHP Warning:  mysqli_real_connect(): (HY000/2002): No such file or directory in /var/www/html/wp-includes/wp-db.php on line 1633
    [17-Jan-2020 16:58:27 UTC] PHP Warning:  mysqli_real_connect(): (HY000/2002): No such file or directory in /var/www/html/wp-includes/wp-db.php on line 1633
    [17-Jan-2020 16:58:27 UTC] PHP Notice:  wpdb was called <strong>incorrectly</strong>. wpdb must set a database connection for use with escaping. Please see <a href="https://ww.wp.xz.cn/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 3.6.0.) in /var/www/html/wp-includes/functions.php on line 4986
    [17-Jan-2020 16:58:27 UTC] PHP Notice:  wpdb was called <strong>incorrectly</strong>. wpdb must set a database connection for use with escaping. Please see <a href="https://ww.wp.xz.cn/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 3.6.0.) in /var/www/html/wp-includes/functions.php on line 4986

    I am not sure what and where this comes from though, as I have a pretty big databases (250mb & 450mb), so I can only assume some tables call for old addresses, but how do I find them and fix?

    It’s possible this may be a plugin or theme conflict. Could you disable some more plugins?

    Disable WPML Multilingual and other Multilingual plugins first and check. If it’s still there after the above, I’d advise disabling all plugins and checking to see if the error still exist.

    If the error disappears, you reactivate the plugins one by one while checking to see if it comes back, so as to detect which plugin is causing the error.

    If the plugin approach doesn’t fix it, temporarily activate any of the default twenty* themes.

    Are you able to access your access.log file? What error do you see there? It could help in pinpointing the issue.

    Meanwhile, try the above suggestions and give me feedback.

    Thread Starter vallor

    (@vallor)

    Disabling ALL plugins somewhat helped, the problem is, that deactivating and even deleting and then installing them anew doesn’t help, because they still use broken DataBase and cause memory leak which then crashes server but now due to WP_REPAIR it fixes tables and site goes back on, until next memory leak crashes it in 30-90min.

    Fully reinstalled Theme stopped causing it, but its broken now as fudge and I have no idea how to restore site’s appearance, WPML crashes site for sure, even after fully reinstalling it(which means there is a problem in database, not in files).

    I have access to my access.log but I don’t know what to look for here, there are 100-200mb of data every day.

    Great work @vallor,

    Now we know it’s a plugin/theme conflict.

    Are you using the latest versions of the themes and plugins? Is your WordPress installation up to date?

    Here are ways you can fix this.

    1. Repair database: Do you have access to phpMyAdmin? It’s a better tool for repairing database. Select all your tables and select repair in the drop-down, after that, select again and choose optimize.

    2. Update to the latest versions; WordPress, plugins/theme.

    3. If the above doesn’t resolve it, abandon known plugins causing conflict (WPMl) and use alternative plugins. If you must use known plugins causing conflict, report the issue to the plugin’s support forum and they’ll fix it.

    4. About your site design, deactivating and reinstalling theme shouldn’t affect your design. If you had deleted the theme, make sure you installed it back with the same file name (that’s, the theme folder’s name is using the name it had previously), most importantly, the theme’s name is exactly the same as it was previously.

    I hope to hear some good news. Cheers!

    Thread Starter vallor

    (@vallor)

    I think I resolved most of my issues (not all yet), problem was in Database as I suspected since the very beginning, some plugins had wrong path written in DB, and those plugins were everywhere on website (template & WPML), so I had to fix those first and then create new database.

    Now though I have a really weird problem with ads I cannot replace adsense ads of previous owner, because when I do, design breaks… because ads look kinda like this:
    <script type=”text/javascript”><!–
    google_ad_client = “pub-*”;
    google_ad_width = 250;
    google_ad_height = 250;
    google_ad_format = “250x250_as”;
    google_ad_type = “text_image”;
    //2007-05-30: N en.R+
    google_ad_channel = “*”;
    google_color_border = “000000”;
    google_color_bg = “000000”;
    google_color_link = “E1771E”;
    google_color_text = “FFFFFF”;
    google_color_url = “E1771E”;
    //–>
    </script>
    <script type=”text/javascript”
    src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”&gt;
    </script>

Viewing 15 replies - 1 through 15 (of 22 total)

The topic ‘Migrating to another Domain & Hosting’ is closed to new replies.