Updating wordpress from my Linux distro’s repository

I installed wordpress with apt, which ties in a lot of directories, so I suspect that using the built-in core update tool will break the installation; but wordfence constantly demands that I update using said tool — which is probably much more up-to-date than the linux distro repository. Do I have to wipe it out and start over in order to resolve this annoying bind?

Dating starter website – Auto updating + Unique + Auto aff links!

Why are you selling this site?

Because it drove 150 uniques in the first ten days of existence and it will keep on growing.

How is it monetized?

You can set your own Ads through Adsense, Ezoic, Publish informational articles on buyer intent keywords (eg. Amazon).

It is best if you keep running the automatic schedule!

Does this site come with any social media accounts?

No. Just the domain, the site, and three PREMIUM plugins (97$ value in…

Dating starter website – Auto updating + Unique + Auto aff links!

403 Forbidden when Updating (I presume POST?) but not Creating (PUT?) an image

I’m using the WordPressPCL library for .NET alongside WooCommerce (although my problem is with the WordPress API, not the WooCommerce API), and trying to upload an image alongside my product

My current process is

  1. Upload the image using WordPressPCL, using the Media.Create() method which I presume PUTs the image
  2. Create the product using WooCommerceNET, with the image’s URL as the product URL
  3. Update the image, setting the Media’s "Post" ID to the WooCommerce product ID

Steps 1 and 2 work fine and I can upload dozens of products, but on 3 I get a 403 Forbidden response which doesn’t make sense to me since I was able to upload the image.

The above order is important to me, because I absolutely do not want to create a product without the image already being on the server – therefore I need to guarantee the process fails if there’s a problem with either the image upload or the product upload. Hence I update the image to attach to the post afterwards.

I know that you don’t strictly need to attach the image to a post, but it’s a requirement from the customer, who uses the attachment to manage deletion of images.

Simplified code below (I’ve removed the details of error handling, object creation etc)

// Create the image try {     uploadedImage = await wordPressClient.Media.Create(imagePath, fileName);     } catch {     // Image upload failed. Fail the process }              // Image uploaded successfully, now create the product try {     productImage = new ProductImage()     {         src = uploadedImage.SourceUrl;     };          product.images.Add(productImage);                      // Replace with the product recieved from the server so that      product = await wooCommerceClient.Product.Add(product);  } catch(Exception e) {     // Product creation failed, fail the process (and try to remove the image, but don't worry about it) }  // Now try to link the image to the post try {     uploadedImage.Post = (int)product.id;     await wordPressClient.Media.Update(uploadedImage); } catch {     // Problem here } 

Is there some kind of API permission I need to set to allow my API user to update the data for an existing media item? Or something else I’m missing?

Forcing a fresh start with Postgres after updating major version

On my Manjaro machine, I updated packages, and Postgres got updated to version 13.2-1.

Before the update, I had some databases on the previous version. Now Postgres won’t start because it recognises that the existing databases are from the old version. When I attempt to start Postgres, I get:

~|⇒ sudo systemctl status postgresql ● postgresql.service - PostgreSQL database server      Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; vendor preset: disabled)      Active: failed (Result: exit-code) since Fri 2021-03-12 21:30:02 GMT; 2min 53s ago     Process: 3173 ExecStartPre=/usr/bin/postgresql-check-db-dir $  {PGROOT}/data (code=exited, status=1/FAILURE)  Mar 12 21:30:01 xps systemd[1]: Starting PostgreSQL database server... Mar 12 21:30:02 xps postgres[3173]: An old version of the database format was found. Mar 12 21:30:02 xps postgres[3173]: See https://wiki.archlinux.org/index.php/PostgreSQL#Upgrading_PostgreSQL Mar 12 21:30:02 xps systemd[1]: postgresql.service: Control process exited, code=exited, status=1/FAILURE Mar 12 21:30:02 xps systemd[1]: postgresql.service: Failed with result 'exit-code'. Mar 12 21:30:02 xps systemd[1]: Failed to start PostgreSQL database server. 

Those databases weren’t important. They were for my personal pet projects and I’m happy to delete them.

How do I do that? Postgres won’t start, so I can’t delete them through psql. How can I force the latest version to start afresh? Ignore or delete the existing databases.

Updating options of a widget with own tool

I am writing a tool to update the options of a self-created widget outside the backend "Appearance – Widgets" page. These are simple yes/no options in the widget.

It seems to work as I am using get_option(optionName) and update_option(optionName, optionValue) but I am confused.

Here is a display of a portion of the options table in WP.

Text

I can perfectly fetch and update the gcs_xxxx parameters but what is this "widget_golf_course_status" option record? It seems it doesn’t have any effect on the output/visualisation of the widget.

When I update the widget options through APPEARANCE – WIDGETS

  • widget_golf_course_status is updated with new values
  • the gcs_xxxx parameters are updated to correct values

When I update the widget options through my own tool (custom page) with get_option() and update_option()

  • widget_golf_course_status record is NOT updated with new values
  • the gcs_xxxx parameters are updated to correct values

Anyway the output looks OK in both cases.

Questions

  1. Do I need to update the widget_golf_course_status when updating options with my own tool? It seems to have no effect on output if it’s not in sync with gcs_xxx options.
  2. Why is this needed? What is it used for?
  3. Do I better just work on ‘widget_golf_course_status’ record and it will auto-update the other records?

Server quit without updating PID file when trying to start MySQL server?

So I created my .bash_profile, opened it in a text editor and added:

export PATH=$  PATH:/usr/local/mysql/bin 

and then I saved it. Next, I tried running

sudo /usr/local/mysql/support-files/mysql.server start 

was told to enter my password (so I did), and then terminal said

Starting MySQL  

and then it kept printing dots until it said:

ERROR! The server quit without updating PID file (/usr/local/mysql/data/Nicks-MacBook-Pro.local.pid). 

The error logs look like:

2021-01-25T20:50:49.707062Z 0 [System] [MY-010116] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.0.23) starting as process 15092 2021-01-25T20:50:49.710232Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive 2021-01-25T20:50:49.834599Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2021-01-25T20:50:49.943719Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2021-01-25T20:50:50.037810Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock 2021-01-25T20:50:50.125494Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2021-01-25T20:50:50.126128Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2021-01-25T20:50:50.151069Z 0 [System] [MY-010931] [Server] /usr/local/mysql/bin/mysqld: ready for connections. Version: '8.0.23'  socket: '/tmp/mysql.sock'  port: 3306  MySQL Community Server - GPL. ~ ~ ~ ~ ~ (END) 

How do I fix this?

conversion failed when converting datetime from character string while inserting and updating to database

I’m trying to insert time and date separately and calculate if it is late to the set time and then insert it to database…

here’s my try code for update

string Date = DateTime.Now.ToString("dd-MM-yyyy"); string Time = DateTime.Now.ToString("h:mm:ss tt"); SqlCommand comm2 = conn.CreateCommand(); comm2.CommandText = "Update Time_Logs SET Time_Out = ‘" + Time + "’ where Emp_Id = ‘" + EmpId.Text + "’ and Date = ‘" + Date + "’"; try { conn.Open(); comm2.ExecuteNonQuery(); MessageBox.Show("Time_Out…"); conn.Close(); TimeCompute(); } catch (Exception x) { MessageBox.Show(x.Message); conn.Close(); }

and here is the code for inserting

string Date = DateTime.Now.ToString("dd-MM-yyyy"); string Time = DateTime.Now.ToString("h:mm:ss tt");

        SqlCommand comm = conn.CreateCommand();         comm.CommandText = "INSERT INTO Time_Logs (Emp_Id, Date, Time_In) VALUES('" + EmpId.Text + "','" + Date + "','" + Time + "')";         try         {             conn.Open();             comm.ExecuteNonQuery();             MessageBox.Show("Time_In...");             conn.Close();             DateTime time = DateTime.Parse(Time);             DateTime inDate = DateTime.Parse("8:00:00 AM");             TimeSpan ts1 = inDate.TimeOfDay;             TimeSpan ts = time - inDate;             if (ts < ts1)             {                 SqlCommand comm2 = conn.CreateCommand();                 comm2.CommandText = "Update Time_Logs SET Late = '" + ts + "' where Emp_Id = '" + EmpId.Text + "' and Date = '" + Date + "'";                 conn.Open();                 comm2.ExecuteNonQuery();                 conn.Close();             }             else             {                 SqlCommand comm2 = conn.CreateCommand();                 comm2.CommandText = "Update Time_Logs SET Late = '" + ts + "' where Emp_Id = '" + EmpId.Text + "' and Date = '00:00:00'";                 conn.Open();                 comm2.ExecuteNonQuery();                 conn.Close();             }         }         catch (Exception x)         {             MessageBox.Show(x.Message);             conn.Close();         } 

Premium Perfume Business For Sale Amazon eBay Affiliate Auto Updating Website

This is the perfect Website for beginners wanting to create an online income with a blog and affiliate store combo. Everything is set up for you and ready to go!

Ready to Start A New Hassle-free Online Income? Then Read On!

PerfumeOnline.store is a stunning affiliate blog + store built using WordPress and the Intelligent Fresh Store System. It is fully loaded with Amazon and eBay products and is ready to go.

No maintenance needed – everything is…

Premium Perfume Business For Sale Amazon eBay Affiliate Auto Updating Website

Questions on updating statistics and index maintenance jobs

Since my question Index and statistics optimization scripts duration and log bloat problem. Looking for good strategy? has been closed because it was not focused enough I’ve three questions:

For statistics and index optimization I want to use Ola Hallengreens scripts.

  1. If I update statistics only or rebuild/reorganize indexes: Is there anyting dangerous by cancelling the job right in the middle of it if I see logfile becomes too big or the job takes too long and slows down daily work?

If not there is nothing I need to worry about and I can run it maybe on any evening or on a saturday and watch how it works and cancel it with no problem if some of the mentioned problems occur. Is this true?

  1. If I use Olas script configured like this (no offline index rebuild):
  • FragmentationLevel1 = 50%
  • FragmentationLevel2 = 80%
  • FragmentationMedium = ‘INDEX_REORGANIZE,INDEX_REBUILD_ONLINE’
  • FragmentationHigh = ‘INDEX_REBUILD_ONLINE’
  • @UpdateStatistics nvarchar(max) = ‘ALL’,
  • @OnlyModifiedStatistics nvarchar(max) = ‘Y’,

Can I use this safely during worktime when people are working on the database?

  1. Is there any dangerous by doing such maintenance jobs (statistics update/index rebuild/index reorganize) which could damage the database if I use Ola with those parameters? The only thing I’ve seen where growing a large log file. Or can I install this with no worries and if anything occurs just cancel it (see question 1)?

Godot / GDscript label text not updating every frame like intended

I am very new to Godot and coding in general, so I apologize in advance for any simple mistakes. I am trying to have my text display the variable "ammodisplay" on my object "Marine." When I launch the game, the text sets to 7 (the correct value) but as I play the game and the variable changes, the text does not update with it. Any insight as to how I can fix this? Thanks in advance!

extends Label  var NODE = load("Marine.tscn") var ammo = NODE.instance() var ammod = ammo.ammodisplay   func _process(delta):     text = (str(ammod)) ```